Re: Flipping over coordinate conversion
Re: Flipping over coordinate conversion
- Subject: Re: Flipping over coordinate conversion
- From: glenn andreas <email@hidden>
- Date: Wed, 26 Apr 2006 16:18:23 -0500
On Apr 26, 2006, at 2:50 PM, James Bucanek wrote:
glenn andreas wrote on Wednesday, April 26, 2006:
Then what you want isn't the frame (i.e., it's coordinates in the
superclass view space) so much as the visibleRect of the view.
You're right, but I couldn't get that to work. I realize now that
my problem was that my child window is listening for the
NSViewFrameDidChange notification. Unfortunately, this message is
not fired when the view is hidden, so my child window doesn't
update if the view disappears entirely.
Do you know of anyway of getting notified when a view is hidden or
its visibleRect changes? Nothing on the list of notifications
documented for NSView would seem to fit the bill.
Assuming it is a custom subclass of some NSView, you could always
post a notification yourself when setHidden: is called. You might
need to listen for both NSViewBoundsDidChangeNotification and
NSViewFrameDidChangeNotification (as well as whatever you post during
setHidden:), though you may get some false positives (i.e.,
visibleRect doesn't always change when either bounds or frame are
changed).
Glenn Andreas email@hidden
<http://www.gandreas.com/> wicked fun!
quadrium | build, mutate, evolve | images, textures, backgrounds, art
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden