Re: NSImageView in IB
Re: NSImageView in IB
- Subject: Re: NSImageView in IB
- From: Scott Thompson <email@hidden>
- Date: Fri, 24 Mar 2006 00:07:26 -0600
I tried following a suggestion that I quit and relaunch IB, but I
think my question is more fundamental than a s/w issue.
In order to use an image in an NSImageView widget, does the image
first need to be added to the Images tab of IB's main panel? If
so, how is this done? Do I need to sub-class and instantiate an
NSImage object first? I've tried, but still haven't found a
mechanism for importing the image.
Note that I am not working in Xcode. I'm building a GUI in IB,
then using the PyObjC bridge for coding.
Your problem is likely that you are not working in XCode.
When your nib is loaded, the computer will look in the current main
bundle for the image that you've specified in IB. The way that IB
figures that out when you are designing is by looking to see if the
target that the bundle is included in (in XCode) contains an image
with that resource name. If it does, then it uses that.
Since you have no XCode project, IB cannot find your images.
One way around this is to go into the preferences in IB, and in the
"Editing" tab select "Allow Images to be Stored inside Nibs". This
should let you drag images onto the images tab of the IB project
window. But, as it says in prefs, this generates nibs that "not
recommended".
Scott
_______________________________________________
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