• 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
category on NSView to draw ist bounds
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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.

  • Follow-Ups:
    • Re: category on NSView to draw ist bounds
      • From: Daryn <email@hidden>
  • Prev by Date: Re: XCode and Java?
  • Next by Date: best practice with helper AppleScript
  • Previous by thread: Re: Cocoa FAQ Baby Steps - (was Re: Strange warnings)
  • Next by thread: Re: category on NSView to draw ist bounds
  • Index(es):
    • Date
    • Thread