Re: A Better way to get a path from NSImage?
Re: A Better way to get a path from NSImage?
- Subject: Re: A Better way to get a path from NSImage?
- From: Andrew Farmer <email@hidden>
- Date: Sat, 17 Feb 2007 20:24:05 -0800
On 17 Feb 07, at 19:44, Ryan Harter wrote:
I have two different methods in a class that need to share a
variable. I think I need to use a global but am not sure, I'm
still relatively new to this. I'm assuming there's a better way to
do this, all I really need is to get the image path I place in an
image view. I've eliminated the drag and drop, since I don't know
how to get the image path, with an NSButton and NSOpenPanel. The
code is as follows:
...
extern NSString *artworkPath;
This should really be an instance variable, not a global. Globals are
generally best avoided.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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