On Aug 16, 2012, at 8:50 PM, Peter Ammon <pam...@apple.com> wrote:

> Is your window set to be visible at launch (i.e. in IB)? Try making it not 
> visible at launch, and then ordering it onscreen after the nib is loaded. 
> That should allow all the awakeFromNib methods to run before the window 
> appears.

Hi Peter,

Your answer made me realize that I am using some fading animation to swap the 
views in and out:

    if ( oldView )
    {
        fadeOut = [NSDictionary dictionaryWithObjectsAndKeys: oldView, 
NSViewAnimationTargetKey, NSViewAnimationFadeOutEffect, 
NSViewAnimationEffectKey, nil];        
    }
    
    fadeIn = [NSDictionary dictionaryWithObjectsAndKeys:  newView, 
NSViewAnimationTargetKey, NSViewAnimationFadeInEffect, 
NSViewAnimationEffectKey, nil];
    
    NSAnimation *animation = [[NSViewAnimation alloc] 
initWithViewAnimations:[NSArray arrayWithObjects: fadeOut, fadeIn, nil]];
    
    animation.duration = 0.25;
   [animation startAnimation];


Once I comment out the last line, the view is loaded immediately, and the popup 
default title as well. When I set the animation time to a long time sec, I am 
able to read what it says before "default" name, and it is something like 
<NSManagedObject: 0x10142c9b0> (entity: MyEntity; id 0x101441630 
<x-coredata://AA7C17...

All the other UI elements are drawn immediately, just not the popup. Which 
makes sense, since I set the title in awakeFromNib. I'll see if I can move the 
code to the init: method of my viewController.

Thanks,

- Koen.


_______________________________________________

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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to