On Thu, Dec 25, 2008 at 5:04 AM, Oleg Krupnov <oleg.krup...@gmail.com> wrote:
> I'm writing a small app whose main window is a HUD panel. In my XIB
> file I changed the class of the Window object from NSWindow to NSPanel
> and checked the HUD box that appeared.
>
> The problem is that after the program starts, sometimes (e.g. half of
> times, not always) the window disappears immediately after appearing,
> and there is no way to bring it back again - clicking on the Dock icon
> or pressing Alt+Tab does not help. Other times the app starts just
> fine and the window is visible.
>
> My guess is that the OS somehow thinks that the HUD window is not the
> main window of the app, but a floating panel, and the OS hides it
> because the main window is not active (there is no main window in its
> opinion.)
>
> Just to note that the window contains a view that wants a Core Animation 
> layer.
>
> What could be the problem?

I haven't a clue what the problem would be, but certainly you could
try to track down the problem further. Subclass the window and
override -close and -dealloc. Put breakpoints on them and reproduce
the problem. See where they're being called from. The stack traces
should, hopefully, tell you what's causing the window to be closed.

Mike
_______________________________________________

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

Reply via email to