Re: Pointers and NSImages
Re: Pointers and NSImages
- Subject: Re: Pointers and NSImages
- From: Gregory Weston <email@hidden>
- Date: Thu, 2 Nov 2006 13:14:40 -0500
Lorenzo wrote:
Hi,
I create my picture
myPict = [[NSImage alloc] init...
Then many other objects use this picture.
[rectangle usePicture:myPict];
[circle usePicture:myPict];
When the user changes the picture I have to update the picture in
all the
objects. Instead I would like to use pointers and avoid to relink
all the
objects to the new picture all the time.
Make the picture a property of some centralized object, or a
singleton in its own right, and reference that object from within
your other classes instead of trying to cache the NSImage explicitly.
Greg
_______________________________________________
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