Custom Palette and NSImage
Custom Palette and NSImage
- Subject: Custom Palette and NSImage
- From: August Trometer <email@hidden>
- Date: Tue, 10 Jan 2006 12:13:42 -0500
I am trying to build a custom palette for a view object I use quite
frequently. The palette works fine, except for being able to
reference images.
The view has a configurable background image, just like a button. In
the view itself, I am storing the name of the image, rather than the
actual image. I'm doing this to save space in the object.
First, is storing the name the best way, or should I store the actual
mage?
Second, when I am using the palette and I configure the background
image, I'd like that image to be displayed as it normally would.
When I use the NIB within an application, it finds the image fine and
renders properly. However, in the palette, the bundle path that
NSImage is checking is "/Developer/Applications/Interface
Builder.app" so the image can't be found. How do I reference the
image from within the project folder when I'm in IB?
Finally, if I get a special image path to display the image in IB,
how can I get the real image when the object is being used in my app?
Basically, what is the proper way to say "if this is in IB do _this_,
but if this is in an app, do _this_."
Thanks!
August
_______________________________________________
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