i too get hung up (and still am to some degree) on converting points etc ... is there an easy guide for this ?
On May 12, 2010, at 1:01 AM, Graham Cox wrote: > > On 12/05/2010, at 2:51 PM, aaron smith wrote: > >> To me the first "localPoint = ..." should be the correct way to >> convert the windowPoint to the control views' coordinate space. But >> it's never right. >> >> Any ideas? > >> localPoint = [[self controlView] convertPoint:windowPoint toView:nil]; > > > You're working way too hard. Also, your first localPoint= is exactly the > wrong way around. It should be: > > > NSPoint localPoint = [controlView convertPoint:[event locationInWindow] > fromView:nil]; > > that should be all you need to do. As I understand it, a cell's -controlView > method might not return the control view reliably, so you are better off > using the view passed to the method as a parameter. > > All that convertScreenToBase stuff you're doing is superfluous AFAICS. > > --Graham > > > _______________________________________________ > > Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) > > Please do not post admin requests or moderator comments to the list. > Contact the moderators at cocoa-dev-admins(at)lists.apple.com > > Help/Unsubscribe/Update your Subscription: > http://lists.apple.com/mailman/options/cocoa-dev/intrntmn%40aol.com > > This email sent to intrn...@aol.com _______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) Please do not post admin requests or moderator comments to the list. Contact the moderators at cocoa-dev-admins(at)lists.apple.com Help/Unsubscribe/Update your Subscription: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to arch...@mail-archive.com