• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: weird sheet problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: weird sheet problem


  • Subject: Re: weird sheet problem
  • From: Brian Ganninger <email@hidden>
  • Date: Mon, 15 Jan 2007 15:29:32 -0600

The timer approach isn't guaranteed to work. If you application were to take dramatically longer for some (unforeseen) reason when loading the associated nib the timer's firing could fall within the awakeFromNib and you'd still end up with the issue you encountered.

- brian 'bgannin' ganninger

On Jan 15, 2007, at 2:53 PM, Dave Sopchak wrote:

Kerry,
Thanks for the tip. I decided to just put a timer in awakeFromNib to start the sheet 0.2 seconds later, and it worked. Sumbitch. I should also try your approach. Bug report?


Dave

On Jan 15, 2007, at 12:14 PM, Keary Suska wrote:

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:
40comcast.net


This email sent to email@hidden

_______________________________________________

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:
40mac.com


This email sent to email@hidden

_______________________________________________

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


  • Follow-Ups:
    • Re: weird sheet problem
      • From: Chris Suter <email@hidden>
References: 
 >Re: weird sheet problem (From: Keary Suska <email@hidden>)
 >Re: weird sheet problem (From: Dave Sopchak <email@hidden>)

  • Prev by Date: howto draw math forumulas
  • Next by Date: Re: Add/Remove table column dynamicly
  • Previous by thread: Re: weird sheet problem
  • Next by thread: Re: weird sheet problem
  • Index(es):
    • Date
    • Thread