FROM : Brian Williams
DATE : Tue Feb 05 21:21:42 2008
I'll anwser my own question for the sake of the archives.
The problem was here
>[[NSImage imageNamed:@"water"]
drawInRect:NSRectFromCGRect(CGContextGetClipBoundingBox(context))
fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
[NSImage imageNamed:@"water"} returns nil in the screen saver frame work
apparently. It worked fine when it was in a regular app.
so I changed it to use:
NSBundle *programBundle = [NSBundle bundleForClass:[self class]];
NSString *path = [programBundle pathForResource:@"water" ofType:@"jpg"];
NSImage *backgroundImage = [[NSImage alloc] initWithContentsOfFile:path];
and it works. So no problem with CA, just my debugging skills :)
DATE : Tue Feb 05 21:21:42 2008
I'll anwser my own question for the sake of the archives.
The problem was here
>[[NSImage imageNamed:@"water"]
drawInRect:NSRectFromCGRect(CGContextGetClipBoundingBox(context))
fromRect:NSZeroRect operation:NSCompositeSourceOver fraction:1.0];
[NSImage imageNamed:@"water"} returns nil in the screen saver frame work
apparently. It worked fine when it was in a regular app.
so I changed it to use:
NSBundle *programBundle = [NSBundle bundleForClass:[self class]];
NSString *path = [programBundle pathForResource:@"water" ofType:@"jpg"];
NSImage *backgroundImage = [[NSImage alloc] initWithContentsOfFile:path];
and it works. So no problem with CA, just my debugging skills :)
| Related mails | Author | Date |
|---|---|---|
| Brian Williams | Feb 5, 09:17 | |
| Brian Christensen | Feb 5, 10:26 | |
| Scott Anguish | Feb 5, 18:46 | |
| Brian Williams | Feb 5, 19:15 | |
| Brian Williams | Feb 5, 21:21 |






Cocoa mail archive

