• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: A Better way to get a path from NSImage?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


References: 
 >A Better way to get a path from NSImage? (From: Ryan Harter <email@hidden>)

  • Prev by Date: A Better way to get a path from NSImage?
  • Next by Date: Re: NSOpenPanel instantly closing
  • Previous by thread: A Better way to get a path from NSImage?
  • Next by thread: changing screensaver defaults causes system preferences to crash
  • Index(es):
    • Date
    • Thread