child window view disappearing
child window view disappearing
- Subject: child window view disappearing
- From: Josh Anon <email@hidden>
- Date: Mon, 12 May 2003 19:35:45 -0700
Hi,
Hold onto your hats; this one's fun! I have a window with a view (A).
I have a second window (B) with a different, transparent view. I want
to composite the things in B onto A, and I make B into a child of A.
Because I want to make the scroll bar work, B is not a transparent
window, but rather a borderless window with a transparent view in a
scroll view (and when the user scrolls that scroll bar, I make A
scroll). That's fine, and it works quite well!
Now, I want to make A full screen. I retain the child windows, enum
over them removing them from A, close A, and make a new fullscreen
window. Then, I orderFront: the new window (C) and add the child
windows (B) back in. Next, I resize the child window to fill the
screen, and I exit out of the method.
If I put a break point right before the last curly brace, the window +
child window are displayed properly, and things look like they're going
to work. But (drum roll, please) clicking "continue" causes the view
from B--the transparent one which allowed me to see the main content
view--to "go away." "Go away" is quoted not because I'm Dr. Evil, but
because in the transparent view, (for debugging reasons), I overrode
removeFromSuperview, removeFromSuperviewWithoutNeedingDisplay,
setFrame:, viewWillMoveToSuperview, viewWillMoveToWindow, release, and
dealloc, and NONE of those methods are called when the view disappears.
For debugging, I also tried making the mostly clear, so that I could
see underneath it. From this, I found out that every other view is
there, except for the transparent one (and its scroll view) in the
child window.
Next, in the child window subclass, I overrode mouseDown:, and when I
checked the subviews, it only found the scroll view. And the scroll
view isn't at a valid memory region.
Does anyone know where my view might be?
Thanks!
Josh
---
Josh Anon
Studio Tools Intern, Pixar Animation Studios
email@hidden
_______________________________________________
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.