Re: creating instance using Class variable
Re: creating instance using Class variable
- Subject: Re: creating instance using Class variable
- From: Eliza Block <email@hidden>
- Date: Wed, 20 Aug 2008 20:42:32 -0400
No error! I just assumed the thing I made it up out of thin air wasn't
going to work.
Sorry about that, and thanks for setting me straight.
-Eliza
On Aug 20, 2008, at 8:36 PM, Charles Steinman wrote:
--- On Wed, 8/20/08, Eliza Block <email@hidden> wrote:
In short, I want to do something like this:
Class stringClass = [NSString class];
id myNewString = [[stringClass alloc] init];
But that doesn't work.
Yes it does. I mean, it creates a static empty string and thus isn't
all that useful, but it works just as well as [[NSString alloc]
init]. Why do think it doesn't work? What specifically is going
wrong? Are you getting an error?
Cheers,
Chuck
_______________________________________________
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