On May 12, 2012, at 5:01 AM, Koen van der Drift wrote:

> But after the search when the table is displayed, awakeFromNib is called 
> again for the sheet, and all my data is gone.

-awakeFromNib is called for each object in a loaded nib … including the nib 
'owner' object. That means it's possible for it to be called multiple times. It 
looks like what happens in your case is that the first call comes when the 
window nib is loaded, and the second when the nib containing the view for the 
table loads (probably because your controller is its owner?)

> I solved it by using windowDidLoad instead of awakeFromNib.

That's the best solution, since the meaning of -windowDidLoad is more specific.

—Jens
_______________________________________________

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