• 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
Why use NSClassWithString?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Why use NSClassWithString?


  • Subject: Why use NSClassWithString?
  • From: Seth Willits <email@hidden>
  • Date: Fri, 15 Aug 2003 12:07:44 -0700

I was trying to figure out how to use a NSAppleScript object to execute an AppleScript, but the selector initWithSource: wasn't working until I found a small portion of an example on the Stone site which used NSClassWithString. Why does it have to be done this way?

[[[NSClassFromString(@"NSAppleScript") alloc] initWithSource:[textField string]] autorelease];


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

"Procrastination is the worst of my virtues, but one that I associate
with all too often."
-- Seth Willits
------------------------------------------------------------------------ ---
_______________________________________________
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.
  • Follow-Ups:
    • Re: Why use NSClassWithString?
      • From: Chris Hanson <email@hidden>
  • Prev by Date: Re: Help with detecting invalid object when in if() test....
  • Next by Date: Re: Documents & Controllers
  • Previous by thread: Re: Oops... Wrong Author!
  • Next by thread: Re: Why use NSClassWithString?
  • Index(es):
    • Date
    • Thread