Re: creating instance using Class variable
Re: creating instance using Class variable
- Subject: Re: creating instance using Class variable
- From: Charles Steinman <email@hidden>
- Date: Wed, 20 Aug 2008 17:36:40 -0700 (PDT)
--- 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