• 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: 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


  • Follow-Ups:
    • Re: NSImageView in IB
      • From: Stephane Sudre <email@hidden>
References: 
 >NSImageView in IB (From: Scott Frankel <email@hidden>)
 >Re: NSImageView in IB (From: Scott Frankel <email@hidden>)

  • Prev by Date: Smart Lists : another way to explore...
  • Next by Date: Pop up window ala msn messenger
  • Previous by thread: Re: NSImageView in IB
  • Next by thread: Re: NSImageView in IB
  • Index(es):
    • Date
    • Thread