RE : newbie: adding nibs: i'm stuck
RE : newbie: adding nibs: i'm stuck
- Subject: RE : newbie: adding nibs: i'm stuck
- From: email@hidden
- Date: Fri, 4 Nov 2005 15:07:44 +0100
Hi,
Did you have a look to SimpleMultiWindow samples in sample code from Apple ?
Hope this help.
Guillaume
> -----Message d'origine-----
> De : George Greene [mailto:email@hidden]
> Envoyé : vendredi 4 novembre 2005 12:23
> À : email@hidden
> Objet : newbie: adding nibs: i'm stuck
>
>
> i'm trying to add a nib to a program which must be called using
> bundles. this problem is found in Hillegass' book, chapter
> 9. i need to discuss what needs to happen. i'm missing something.
>
> in this chapter, a preference panel is created. the problem calls
> for a nib to be added and loaded when the "About Application" is
> selected from the Application menu.
>
> an appController is created. if i'm understanding this correctly,
> please correct me if i'm not, the appController controls the
> preference panel controller. the preference panel controller
> receives message from the objects on the preference panel nib. i
> hope i'm understanding that correctly. this is already done in the
> book.
>
> the task is to add a nib, for "About Application" and use bundles.
>
> this is where i'm getting lost.
> i created a MyAboutController. in appController, i create a method
> called -showMyAboutPanel. i create a nib file using a panel from IB
> and drag a system text font onto the panel. i saved the About nib,
> but for some reason it did not ask me if it should be added to the
> project. (XCode2) i tried to connect About Application to File's
> Owner. ok that was wrong. i tried to connect it to the
> AppController, but it was connected using a different method. i
> disconnect that method. i was then able to connect it using the -
> showAboutPanel. i have got to be wrong somewhere in here, right.
> inside MyAboutController i defined the -init method as
>
> - (id) init
> {
> NSBundle *myBundle = [NSBundle mainBundle];
> [myBundle loadNibNamed: @"About" owner: myBundle];
> return self;
> }
>
> in AppController i defined -showMyAboutPanel: (id)
> {
> if ( !myAboutController )
> {
> myAboutController = [[MyAboutController alloc] init];
> }
>
> [myAboutController makeKeyAndOrderFront:self];
> }
>
> there are no variable or method headed in MyAboutController.h file.
> no outlet or method headers.
>
> ok i know i'm wrong. where did i go wrong? what am i missing? how
> should i approach adding a nib that will be displayed when i choose
> something from the menu? Is it necessary to create a
> controller? it
> seems like it should be a controller for each added nib. right?
>
> thanks everyone,
>
> g.
> _______________________________________________
> Do not post admin requests to the list. They will be ignored.
> Cocoa-dev mailing list (email@hidden)
> Help/Unsubscribe/Update your Subscription:
email@hidden
This email sent to email@hidden
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden