• 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
Re: parameterized object creation
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: parameterized object creation


  • Subject: Re: parameterized object creation
  • From: John James <email@hidden>
  • Date: Fri, 15 Apr 2005 05:55:50 -0400

Thanks all that responded; That was it.
On Apr 14, 2005, at 11:55 PM, Anthony Duer wrote:

It is like deserialize but with out the member values.  I want to allocate an instance of an object given a string set to its class name.  How is this done?


You often see stuff like this for plug-ins...

Class theClass = NSClassFromString(classNameAsString);
id theObject = [[theClass alloc] init];

~Anthony Duer


 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Prev by Date: Re: dynamically allocating arrays of type double
  • Next by Date: Re: dynamically allocating arrays of type double
  • Previous by thread: Re: parameterized object creation
  • Next by thread: NSCoder encodeX:forKey vs encodeX:
  • Index(es):
    • Date
    • Thread