Re: Help with NSBitmapImageRep, please
Re: Help with NSBitmapImageRep, please
- Subject: Re: Help with NSBitmapImageRep, please
- From: "Adam R. Maxwell" <email@hidden>
- Date: Thu, 30 Oct 2008 18:29:58 -0700
On Thursday, October 30, 2008, at 05:12PM, "M Pulis" <email@hidden> wrote:
> NSBitmapImageRep *aFrameBitmap=nil;
> aFrameBitmap = [NSBitmapImageRep alloc];
> [aFrameBitmap initWithBitmapDataPlanes:nil
Missed this in my previous message: you need to assign the result of [aFrameBitmap initWithBitmapDataPlanes...] or nest the alloc/init. So do this:
NSBitmapImageRep *x = [[NSBitmapImageRep alloc] initWithBitmapDataPlanes:...]
or the less-standard
NSBitmapImageRep *x = [NSBitmapImageRep alloc];
x = [x initWithBitmapDataPlanes:...];
I recommend the former, since it's a more typical Cocoa pattern. Disregarding the result of the initializer can get you in trouble quickly.
--
Adam
_______________________________________________
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