• 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
Image missing in Palette?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Image missing in Palette?


  • Subject: Image missing in Palette?
  • From: Thomas Lachand-Robert <email@hidden>
  • Date: Thu, 21 Mar 2002 21:13:10 +0100

Is there a special location to put images for a palette? I have a custom control whose (simplified) drawRect is as follows:
- (void)drawRect:(NSRect)rect
{
NSRect bounds = [self bounds];
NSImage *image = [[NSImage imageNamed:@"myImage"] retain];

if (!image) {
NSLog(@"Error in TLRTranslation: image missing");
[[NSColor redColor] set];
[NSBezierPath fillRect:bounds];
}
else {
NSSize size = [image size];
[image drawInRect:bounds fromRect:NSMakeRect(0, 0, size.width, size.height)
operation:NSCompositeSourceOver fraction:1.0];
}
}

This works in the original project (with file "myImage.tiff" in Resources folder), but now I'm trying to create a palette for this control. The palette loads, but I get only the red rectangle and the Log message, even though the file "myImage.tiff" is in the Resources folder of the palette, too. So maybe I should put it somewhere else?

Thomas Lachand-Robert
********************** email@hidden
<< Et le chemin est long du projet ` la chose. >> Molihre, Tartuffe.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.

  • Follow-Ups:
    • Re: Image missing in Palette?
      • From: "Erik M. Buck" <email@hidden>
  • Prev by Date: Re: Need clarification on categories
  • Next by Date: Re: mouseMoved problems
  • Previous by thread: Re: mouseMoved problems
  • Next by thread: Re: Image missing in Palette?
  • Index(es):
    • Date
    • Thread