• 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: Dynamic Creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Dynamic Creation


  • Subject: Re: Dynamic Creation
  • From: Wim Lewis <email@hidden>
  • Date: Mon, 18 Feb 2013 12:22:59 -0800

On 18 Feb 2013, at 1:17 AM, Christ Levesque wrote:
> Ability to create instances of classes that did not exist at the time an app was compiled and dynamically load and link new class at runtime.
> How to implement it?


NSBundle is the Cocoa way to deal with loading new code at runtime (plugins, etc). (Or CFBundle if you prefer the CoreFoundation APIs.) You can either use NSBundle's -principalClass or -classNamed: methods to find the newly-loaded class, or you can give the class a +load method and have it register itself with your app somehow when the bundle is loaded. (See the NSObject documentation for information about the +load method.)





_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

References: 
 >Dynamic Creation (From: Christ Levesque <email@hidden>)

  • Prev by Date: Re: Facade
  • Next by Date: No mouseExited when switching windows
  • Previous by thread: Dynamic Creation
  • Next by thread: What is the meaning of id<MyProtocol>?
  • Index(es):
    • Date
    • Thread