Re: What alternatives exist for objc_setClassHandler?
Re: What alternatives exist for objc_setClassHandler?
- Subject: Re: What alternatives exist for objc_setClassHandler?
- From: Michael Ash <email@hidden>
- Date: Sat, 31 Jan 2009 17:51:21 -0500
On Sat, Jan 31, 2009 at 3:36 PM, Andrew Thompson <email@hidden> wrote:
> Hi all,
>
> I was looking for a way to define Objective-C classes at runtime...
> specifically to be able to supply class definitions when a Nib file is
> loaded. This search soon led me to objc_setClassHandler, but that's listed
> as deprecated without replacement here:
> http://developer.apple.com/documentation/Cocoa/Reference/ObjCRuntimeRef/Articles/ocr10_5delta.html
>
> What's the story here? Is there a new, preferred way to do this? What are
> the Ruby etc. bridges doing?
The bridges don't need this functionality, as they can build the
bridging classes as they are created, rather than doing lazy loading.
If you can do that as well, that would seem to be an obvious approach.
The contents of a nib file shouldn't be a mystery, but should be known
ahead of time, so you ought to be able to create all of your classes
before you load the nib.
Mike
_______________________________________________
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