• 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: Converting Window coord to View coord
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Converting Window coord to View coord


  • Subject: Re: Converting Window coord to View coord
  • From: "John C. Randolph" <email@hidden>
  • Date: Wed, 12 Mar 2003 20:34:11 -0800

On Wednesday, March 12, 2003, at 08:13 PM, Hisaoki Nishida wrote:

I can't seem to find a method in NSWindow that converts its window
coordinates to the coord of the view passed in as argument.
The lack of such method suggests that I am supposed to do this manually?


I can see the method in NSView though:

convertPoint:toView:

- (NSPoint)convertPoint:(NSPoint)aPoint toView:(NSView *)aView

Converts aPoint from the receiver's coordinate system to that of aView.
If aView is nil, this method instead converts to window base
coordinates. Both aView and the receiver must belong to the same
NSWindow. Returns the converted point.

The method you want is [NSView -convertPoint:fromView:]

-jcr

John C. Randolph <email@hidden> (408) 974-8819
Sr. Cocoa Software Engineer,
Apple Worldwide Developer Relations
http://developer.apple.com/cocoa/index.html
_______________________________________________
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: 
 >Converting Window coord to View coord (From: Hisaoki Nishida <email@hidden>)

  • Prev by Date: Re: Code for parsing Objective-C files?
  • Next by Date: Re: Toolbar hide/show button
  • Previous by thread: Converting Window coord to View coord
  • Next by thread: [ANN] BombSquad 1.1
  • Index(es):
    • Date
    • Thread