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

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.

References: 
 >category on NSView to draw ist bounds (From: Jörn Salewski <email@hidden>)

  • Prev by Date: best practice with helper AppleScript
  • Next by Date: Re: Xcode... - rendezvous + cluster
  • Previous by thread: category on NSView to draw ist bounds
  • Next by thread: best practice with helper AppleScript
  • Index(es):
    • Date
    • Thread