• 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: NSImageView in IB
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: NSImageView in IB


  • Subject: Re: NSImageView in IB
  • From: Stephane Sudre <email@hidden>
  • Date: Fri, 24 Mar 2006 12:08:16 +0100


On 24 mars 06, at 07:07, Scott Thompson wrote:

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".

It's been my experience that depending on how you are copying a widget (NSButton for instance) from one nib to another one, the images of the widget are added to the destination nib too.


So this is another way to unwillingly strore images inside nibs.


_______________________________________________ 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
References: 
 >NSImageView in IB (From: Scott Frankel <email@hidden>)
 >Re: NSImageView in IB (From: Scott Frankel <email@hidden>)
 >Re: NSImageView in IB (From: Scott Thompson <email@hidden>)

  • Prev by Date: Pop up window ala msn messenger
  • Next by Date: NSTreeController - canonical example? (and other related questions)
  • Previous by thread: Re: NSImageView in IB
  • Next by thread: Confused on releasing bindings in doc-based apps
  • Index(es):
    • Date
    • Thread