Re: category on NSView to draw ist bounds
Re: category on NSView to draw ist bounds
- Subject: Re: category on NSView to draw ist bounds
- From: Daryn <email@hidden>
- Date: Tue, 24 Jun 2003 20:29:54 -0500
Did you invoke lockFocus before calling drawFrameRect?
On Tuesday, June 24, 2003, at 07:51 PM, Jvrn Salewski wrote:
Hello,
I thought I could write a category on NSView to draw a framerect inside
itself, like:
-(void)drawFrameRect {
[[NSColor blueColor] set];
NSFrameRect([self bounds]);
}
But it doesn't work.
Using the same two lines of code in the drawRect: method of a subclass
work
as expected. But I definitly done't want to subclass.
In case of my category a rect is drawn, but in the coordinate system
of the
superview. I played around for quite a while with all kinds of drawing
methods.
I'm afraid I've overlooked some tiny little stupid thing, but what?
Can anybody help?
_______________________________________________
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.
Daryn
_______________________________________________
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.