Re: On NSClassFromString method
Re: On NSClassFromString method
- Subject: Re: On NSClassFromString method
- From: Dan Treiman <email@hidden>
- Date: Thu, 24 Feb 2011 21:26:34 -0600
You can fix this by adding the -ObjC linker flag. See related issue:
http://developer.apple.com/library/mac/#qa/qa2006/qa1490.html
This will force the linker to load classes from the static library
Another way is to reference the class directly somewhere in the code such that it has no effect, i.e.
[ClassINeed class];
-Dan Treiman
On Feb 24, 2011, at 9:19 PM, Leon Qiao wrote:
> Dear all,
>
> I got a problem when using the NSClassFromString method to get a class.
> The code is used in the google docs library. It failed to get the Class
> object, the return value is 0x0.
> But I already linked the library, and it works fine when using the class
> itself directly.
> Anyone who met the same problem, please help me. Thanks!
>
> --
> Best regards
> Leon
> _______________________________________________
>
> 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
_______________________________________________
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