• 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
timing of showing a window and setting display attributes of controls on that window
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

timing of showing a window and setting display attributes of controls on that window


  • Subject: timing of showing a window and setting display attributes of controls on that window
  • From: Stuart Malin <email@hidden>
  • Date: Tue, 3 Jun 2008 14:06:43 -1000

I have a window with a few NSTextFields. The window has a controller (sub class of NSWindowController). The window is loaded from a Nib.

I set the stringValue of the NSTextFields using the -setStringValue. I tried doing this before showing the window:[super showWindow:self];

I moved the -showWindow to before I set the values; the values now display.

1. Why doesn't this work when -showWindow is invoked after setting the control's display values? Is the window not fully "alive" (in some sense) after the Nib is loaded but before it is first shown?

2. I am doing what I do because I want the window to appear with the display values set. Do I not need to worry about the order of the - showWindow invocation -- that is, is the window displayed immediately upon execution of the -showWindow, or on the next iteration of the run loop (hence, my method calls to set the values of the controls occur before the window is displayed)?

Thanks in advance for replies that advance my understanding.







_______________________________________________

Cocoa-dev mailing list (email@hidden)

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:
This email sent to email@hidden


  • Follow-Ups:
    • Re: timing of showing a window and setting display attributes of controls on that window
      • From: Randall Meadows <email@hidden>
  • Prev by Date: Re: many-to-many relationships and retain cycles
  • Next by Date: IB Plugin Exchange / Apple Pro Apps Elements?
  • Previous by thread: Re: set up multiple columns in NSTableView
  • Next by thread: Re: timing of showing a window and setting display attributes of controls on that window
  • Index(es):
    • Date
    • Thread