Re: init code in ApplicationNotifications/awakeFromNib
Re: init code in ApplicationNotifications/awakeFromNib
- Subject: Re: init code in ApplicationNotifications/awakeFromNib
- From: Matt Neuburg <email@hidden>
- Date: Tue, 17 Sep 2002 16:47:28 -0700
On Tue, 17 Sep 2002 23:02:12 +0100, Robert Tillyard <email@hidden>
said:
>
I have an application with two NIB's and I appear to get an
>
awakeFromNib twice once when MainMenu.nib loads and again when my
>
AboutPanel.nib loads.
That's interesting but since you don't talk about that any further in your
note it's impossible to help you.
>
The example says put this in Controller.m
>
>
> @implementation Controller(ApplicationNotifications)
>
>
>
> - (void)applicationDidFinishLaunching:(NSNotification*)notification
>
> {
>
> radix = [[radixPopUp selectedItem] tag];
>
> [self clearall:self]; // Book says clearAll but we don't have one.
>
> }
>
>
and this in Controller.h
>
>
>
>
> @interface Controller(NSApplicationNotifications)
>
> - (void)applicationDidFinishLaunching:(NSNotification*)notification;
>
> @end
(1) You don't need anything of the sort in Controller.h. The book is wrong
to make you do that. (I believe I can show that it makes errors at the rate
of approximately one per page, many of them very serious.)
(2) You won't get any app delegate messages unless, presumably in IB,
you've made Controller your app delegate. Have you?
m.
--
matt neuburg, phd = email@hidden,
http://www.tidbits.com/matt
pantes anthropoi tou eidenai oregontai phusei
Subscribe to TidBITS! It's free and smart.
http://www.tidbits.com/
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives:
http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.