Re: [Newbie] Uninitialized outlets?
Re: [Newbie] Uninitialized outlets?
- Subject: Re: [Newbie] Uninitialized outlets?
- From: Robert S Goldsmith <email@hidden>
- Date: Thu, 06 Sep 2001 14:20:08 +0100
Hi :)
All I observed was the following:
With no awakeFromNib method and no window or panel open on
startup, but with the file-open menu item connected up, when
you ran the app (which compiled fine), the File-open menu
item was greyed out so you could not open a file.
As soon as i added the awakeFromNib method, everything
worked without a problem.
I assumed that my class was checked to see if it responded
to the awakeFromNib call, and if it did, it was correctly
linked and informed it was 'awakened'. If not, it was not
initialised.
However, as I have no idea at all about what is going on, it
was just a guess. Please don't take my word for it that this
is what happens! :)
Robert
Ondra Cada wrote:
Robert,
Robert S Goldsmith (RSG) wrote at Thu, 06 Sep 2001 11:14:50 +0100:
RSG> I have noticed that with menus, outlets are not connected
RSG> until your class instance has responded to awakeFromNib -
RSG> even if you do nothing in awakeFromNib. It simply seems the
RSG> method has to be there.
Hmmmmmmmmm. That looks to me very very strange???? Are you quite sure?
Whenever you bind an outlet to an object, the thing is connected when the
NIB is loaded (before the awakeFromNib, but independently on it).
For menus, a majority of their "outlets" (targets, actually -- there's a
slight difference in meaning) are connected to First Responder, which means
they contain _nil_ -- before, during, and after awakeFromNib.
---
Ondra Cada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
cocoa-dev mailing list
email@hidden
http://www.lists.apple.com/mailman/listinfo/cocoa-dev