Word up to Seth and Jerry!
I'll be a Cocoa engineer yet!
-koko
On Sep 21, 2010, at 11:07 PM, Seth Willits wrote:
On Sep 21, 2010, at 9:21 PM, k...@highrolls.net wrote:
NSString *class = [NSString stringWithCString:[data bytes]
encoding:NSASCIIStringEncoding];
Class obst
On Sep 21, 2010, at 9:21 PM, k...@highrolls.net wrote:
> NSString *class = [NSString stringWithCString:[data bytes]
> encoding:NSASCIIStringEncoding];
> Class obstacle = NSClassFromString(class);
> id thisObstacle = [[obstacle alloc] initWithImage:[sender
On 2010 Sep 21, at 21:21, k...@highrolls.net wrote:
> However, must I retain [sender draggedImage] so the code becomes:
>
> id thisObstacle = [[obstacle alloc] initWithImage:[[sender draggedImage]
> retain] andLocation:[sender draggingLocation]];
No. Your 'obstacle' should retain its 'image' a
Thanks! Now I have:
NSString *class = [NSString stringWithCString:[data bytes]
encoding:NSASCIIStringEncoding];
Class obstacle = NSClassFromString(class);
id thisObstacle = [[obstacle alloc] initWithImage:[sender
draggedImage] andLocation:[sender draggingLocation]];
NSClassFromString
A method I always have trouble remembering and never find when I search.
On Sep 22, 2010, at 12:01, k...@highrolls.net wrote:
> Given an NSString which is the name of a class what voodoo do I perform to
> create an instance of that class?
>
> -koko
> __
On Tue, Sep 21, 2010 at 11:01 PM, wrote:
> Given an NSString which is the name of a class what voodoo do I perform to
> create an instance of that class?
Use NSClassFromString().
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not po
Given an NSString which is the name of a class what voodoo do I
perform to create an instance of that class?
-koko
___
Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)
Please do not post admin requests or moderator comments to the list.
Contact th