Skip navigation.
 
mlwhat does -[NSView convertRect:toView:] do with nil view?
FROM : Adam R. Maxwell
DATE : Sat May 17 22:15:29 2008

The API documentation for -[NSView convertRect:toView:] reads 
identically to the documentation for -[NSView convertRect:fromView:] 
when a nil parameter is passed for the view:

"If aView is nil, this method instead converts from window base 
coordinates. Otherwise, both aView and the receiver must belong to the 
same NSWindow object."

I've always assumed that -[someView convertRect:aRect toView:nil] 
would convert a rect /from/ someView's coordinate system /to/ the 
view's window's coordinate system, but that doesn't seem consistent 
with the statement above.

ISTR filing a bug or sending feedback on this a long time ago, but 
just noticed that it still doesn't make sense to me.  Can anyone 
clarify this?

thanks,
Adam

Related mailsAuthorDate
mlwhat does -[NSView convertRect:toView:] do with nil view? Adam R. Maxwell May 17, 22:15
mlRe: what does -[NSView convertRect:toView:] do with nil view? Jens Alfke May 17, 22:53