Re: Why use NSClassWithString?
Re: Why use NSClassWithString?
- Subject: Re: Why use NSClassWithString?
- From: Seth Willits <email@hidden>
- Date: Fri, 15 Aug 2003 15:03:16 -0700
On Friday, August 15, 2003, at 01:13 PM, Chris Hanson wrote:
One reason to do this is if you need to run on 10.1, where
NSAppleScript isn't available. If you write your code like this:
NSAppleScript *myScript
= [[[NSAppleScript alloc] initWithSource:myScript] autorelease];
then it creates compile-time dependency on the NSAppleScript class.
So when you try to run your application on 10.1 it'll fail dynamic
linking, because Foundation in 10.1 doesn't include NSAppleScript.
That's my guess as to why his example does it anyway. If you're only
concerned about 10.2 and later, then I wouldn't worry about it.
Ohh.... any idea why using it like above failed on 10.2.6?
Seth Willits
------------------------------------------------------------------------
---
President and Head Developer of Freak Software -
http://www.freaksw.com
Q&A Columnist for REALbasic Developer Magazine -
http://www.rbdeveloper.com
Webmaster for REALbasic Game Central -
http://www.freaksw.com/rbgames
"Your friend is the person who knows all about you and still likes you."
-- Elbert Green Hubbard
------------------------------------------------------------------------
---
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.