I'm trying to create a view with a background image, but getting error after error...

- (void)drawRect:(NSRect)rect {
    NSRect bounds = [self bounds];
        NSImage *background = [[NSImage alloc] init];
        [background setImage:@"ScrollBackground"];
        [[NSColor colorWithPatternImage:background] set];
        [NSBezierPath fillRect:bounds];
}


I've added a .png named ScrollBackground to my Resources folder. The code compiles but I get a warning: "NSImage may not respond to '- setImage'.

How can I make this right?

Thanks.

Brad
_______________________________________________

Cocoa-dev mailing list ([email protected])

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to [EMAIL PROTECTED]

Reply via email to