• 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 a PrefPane
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

RE: NSImageView in a PrefPane


  • Subject: RE: NSImageView in a PrefPane
  • From: "Yves Peneveyre" <email@hidden>
  • Date: Thu, 15 Nov 2001 10:23:40 +0100

Hello Martin,

The problem you have is that the main bundle is not _yours_.
The main bundle is the system preferences application bundle...
You can do that with the following code (I'm sure it's not the best way) :

- (void) mainViewDidLoad
{
NSBundle *prefBundle;
NSString *pathForResource;
NSImage *logofile;

prefBundle = [NSBundle bundleForClass: [self class]];
pathForResource = [prefBundle pathForResource: @"logo" ofType:
@"tiff"];
logofile = [[NSImage alloc] initByReferencingFile: pathForResource];

// Probably, you can use your line of code, with a little change, instead
of mine :
// logofile = [NSImage imageNamed: pathForResource];
[logo setImage:logofile];
....
}

Regards
Yves

----------------------------------------------------------------
Yves Peneveyre direct line : ++41 21 802 5754
Software Engineer fax : ++41 21 802 5751
LooKware development Ltd phone : ++41 21 802 5750
6B, ch du Tresi email: email@hidden
CH - 1028 Preverenges web: http://www.lookware.ch
----------------------------------------------------------------

-----Original Message-----

References: 
 >NSImageView in a PrefPane (From: Martin Kautz <email@hidden>)

  • Prev by Date: Re: FSSpec for non-existant file?
  • Next by Date: Re: FSSpec for non-existant file?
  • Previous by thread: NSImageView in a PrefPane
  • Next by thread: RE: NSImageView in a PrefPane
  • Index(es):
    • Date
    • Thread