Pointers and NSImages
Pointers and NSImages
- Subject: Pointers and NSImages
- From: Lorenzo <email@hidden>
- Date: Thu, 02 Nov 2006 16:37:34 +0100
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. Something like I set once forever:
[rectangle usePicturePtr:&myPict];
But this doesn't work. Any time I reallocate a new picture I lose the
previous pointer and get a new one.
How should I do?
Best Regards
--
Lorenzo
email: email@hidden
_______________________________________________
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