Class lookup at runtime
Class lookup at runtime
- Subject: Class lookup at runtime
- From: "Wesley Smith" <email@hidden>
- Date: Fri, 7 Dec 2007 01:41:55 -0800
Hi,
I'm trying to figure out how to dynamically get access to a class
instance from a string. Let's say I have a C string with
"NSRectangle" in it. Is there a way to find the NSRectangle class and
then call alloc on it to generate an instance? I see how to get a
Selector from a string, but I haven't found anything about getting a
class object. Is there some part of the Obj-C runtime I can ask for
this info?
thanks,
wes
_______________________________________________
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