category on NSView to draw ist bounds
category on NSView to draw ist bounds
- Subject: category on NSView to draw ist bounds
- From: Jörn Salewski <email@hidden>
- Date: Wed, 25 Jun 2003 02:51:41 +0200
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.