Mailing Lists: Apple Mailing Lists

Image of Mac OS face in stamp
 
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

best time to alter GUIs



I am trying to understand the interrelationship between various method calls made once a window controller is instantiated. I am loading a window controller from within a master controller. Data passed from the master controller to the window controller is used to programmatically alter the way the window appears The initial master code is as follows:

if (!fieldIDController)
{
  fieldIDController = [[Step3_FieldIDController alloc] init];
}
[fieldIDController setLocalDataCopy: [self dataValues]];
[fieldIDController showWindow: self];

Now here's the problem. It makes sense to check whether the controller exists before adding local data and loading the window, hence the if (!fieldIDController). But once init is called for fieldIDController, all the following take place:

- the init (which calls super = initWindowWithNibName:)
- windowWillLoad (I tried the delegate)
- awakeFromNib
- windowDidLoad

In other words, the window loads right away. I actually don't want it to load until I have set the local data, as it is the local data that will determine how the window should appear. Is there a way to sneak the data in in before all the loading takes place?

Thanks.



_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/email@hidden

This email sent to email@hidden


Visit the Apple Store online or at retail locations.
1-800-MY-APPLE

Contact Apple | Terms of Use | Privacy Policy

Copyright © 2007 Apple Inc. All rights reserved.