• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
RE: Load Framework at runtime.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: Load Framework at runtime.


  • Subject: RE: Load Framework at runtime.
  • From: Harmanpreet Bachal <email@hidden>
  • Date: Tue, 22 Nov 2005 06:02:36 -0800 (PST)

  YA sure this would help. Thanks there!!

  Do u know y I am facing the other problem i.e. unable to register a notification if I load my framework at runtime.


Rosyna <email@hidden> wrote:        If you use -bundleWithPath: it is autoreleased. So yes, you did release it. Also try this instead:


  Class PDFViewClass=NSClassFromString(@"PDFView");
  Class PDFDocumentClass=NSClassFromString(@"PDFDocument");


  PDFViewClass * view = [[PDFViewClass alloc] initWithFrame:rect];
  PDFDocumentClass * doc = [[PDFDocumentClass alloc] initWithUrl:@"path"];
  [view setDocument:doc];


  Ack, at 11/22/05, Harmanpreet Bachal said:


  I load the framework and call it's functions like any others. i.e.     PDFView * view = [[PDFView alloc] initWithFrame:rect];  PDFDocument * doc = [[PDFDocument alloc] initWithUrl:@"path"];  [view setDocument:doc];     The PDFView and PDFDocument are defined in the Framework.     I have not released the NSBundle anywhere.

Rosyna <email@hidden> wrote:
  You didn't quite answer the question. And yes, you loaded your
frameworks bundle.. using NSBundle.

Try [[NSBundle alloc] initWithPath:] instead (and do not release the
NSBundle instance).

How are you calling the functions in the framework?

Ack, at 11/22/05, Harmanpreet Bachal said:

>I did not load a bundle but loaded a Framework at runtime.
>If u r asking for the code then here is what I did::
>
>NSBundle * b1 = [NSBundle bundleWithPath:@"whatever"];
>[b1 load];
>
>This loaded my framework and i successfully called it's functions
>but could not register my notification.
>  >Thnx.

  --


Sincerely,
Rosyna Keller
Technical Support/Holy Knight/Always needs a hug

Unsanity: Unsane Tools for Insanely Great People

It's either this, or imagining Phil Schiller in a thong.




---------------------------------
 Yahoo! FareChase - Search multiple travel sites in one click.
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >RE: Load Framework at runtime. (From: Rosyna <email@hidden>)

  • Prev by Date: RE: Load Framework at runtime.
  • Next by Date: Re: Obtaining an array of the names of the attributes and relations of a class
  • Previous by thread: RE: Load Framework at runtime.
  • Next by thread: Screen Resolution and Screen Size
  • Index(es):
    • Date
    • Thread