Re: weird sheet problem
Re: weird sheet problem
- Subject: Re: weird sheet problem
- From: Keary Suska <email@hidden>
- Date: Mon, 15 Jan 2007 13:14:28 -0700
- Thread-topic: weird sheet problem
on 1/15/07 12:54 PM, email@hidden purportedly said:
> I have a sheet that doesn't display properly. The sheet code is
> called directly from -awakeFromNib. For some reason, the sheet window
> doesn't attach to the main window, it's just displayed next to it (as
> it's laid out in IB). Even stranger, for sanity's sake, I switched
> the main window and the sheet in the sheet calling code, and the main
> window behaves properly as a sheet in this case!
>
> I've checked the attributes of both of these windows in IB and tried
> to set them to be identical, since my main window works as a sheet.
> Does anyone know any attribute or condition that would prevent a
> sheet from operating properly? I've used sheets many times and this
> is the first time I've had this trouble.
I had a similar problem once (calling sheet in awakeFromNib), and I think it
had to do with the fact that the window for the sheet wasn't open yet. But I
could be misremembering.
In any case, I moved the code out of awake... and into windowDidBecomeMain
(or similar). Of course you have to set the window's delegate for this work.
Best,
Keary Suska
Esoteritech, Inc.
"Demystifying technology for your home or business"
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden