I know I could set the string in objects and on awakeFromNib set the text fields, but it just seems inefficien
We encourage you to use the controller's controller specific methods for knowing when you content is loaded:

NSWindowController -- windowDidLoad
UIViewController -- viewDidLoad

Since the behavior of awakeFromNib differs between iPhone OS and Mac OS X, using windowDidLoad or viewDidLoad will ensure you only receive that message once: when the window or view is loaded.

Kevin

--------------------------
Kevin Cathey


On 10 Jun 2009, at 09:56, Micha Fuhrmann wrote:

Rajendran,

Many thanks for your answer. You are right. Now there's something I don't understand in terms of sequence, at least it doesn't make sense to me. I instantiate the Object, why shouldn't I be able to send messages to contained objects? How am I suppose to deal with the sequence? I mean, I instantiate an object but the I can't dispose from it after. How do you deal with that kind issue? I know I could set the string in objects and on awakeFromNib set the text fields, but it just seems inefficient. Any tricks?

Michael

On 10 juin 09, at 18:30, rajendran_pichaimur...@mcafee.com wrote:


Hi,
oulets are not allocated on initiate . Its guaranteed to be allocated only on awakeFromNib . Any message to outlet should be sent from awakeFromNib and not from init method.



Regards
Rajendran P

-----Original Message-----
From: cocoa-dev-bounces+rajendran_pichaimurthy=mcafee....@lists.apple.com [mailto:cocoa-dev-bounces +rajendran_pichaimurthy=mcafee....@lists.apple.com] On Behalf Of Micha Fuhrmann
Sent: Wednesday, June 10, 2009 9:40 PM
To: Cocoa List
Subject: Outlets not allocated

Hi there,

It's been hours and really I don't get it. I've got a custom NSWindowController class. I'm loading it with a Nib. That Nib contains a window and text fields in it all linked through outlets to my NSWindowController class. When I allocate and initiate the window appears fine, but when I send a message to fill in the text fields nothing happens. If I set a breakpoint I can see that none of my outlets are allocated (0x0 under the value column). Why aren't they allocated and initiated when the Nib is loaded?

Any help greatly appreciated.
_______________________________________________

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:
http://lists.apple.com/mailman/options/cocoa-dev/rajendran_pichaimurthy%40mcafee.com

This email sent to rajendran_pichaimur...@mcafee.com

_______________________________________________

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

This email sent to cat...@apple.com

_______________________________________________

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

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

Reply via email to