• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: RE : newbie: adding nibs: i'm stuck
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: RE : newbie: adding nibs: i'm stuck


  • Subject: Re: RE : newbie: adding nibs: i'm stuck
  • From: Boyd Collier <email@hidden>
  • Date: Sat, 5 Nov 2005 10:11:15 -0800

Guillaume's reply refers to SimpleMultiWindow as Apple-provided sample code
showing how to do what he would like to do. Since my posting a few days ago
asked a similar question, I looked for SimpleMultiWindow in Apple's list of
sample code but could not find it. I also Googled it and found several references
to it from several years ago but couldn't find the actual sample code itself. If
someone still has a copy that they would be willing to share or knows where
it can still be downloaded from, please let me know. Alternatively, if someone
knows a simple example that supersedes SimpleMultiWindow, I'd greatly
appreciate having it pointed out to me. (I've looked at Sketch but there's a lot
of code in it that is extraneous to the essential question, which makes it
hard to follow).


Boyd


On Nov 4, 2005, at 6:07 AM, email@hidden wrote:

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:
40sunstroke.sdsu.edu


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
  • Follow-Ups:
    • Re: RE : newbie: adding nibs: i'm stuck
      • From: Andreas Mayer <email@hidden>
References: 
 >RE : newbie: adding nibs: i'm stuck (From: email@hidden)

  • Prev by Date: Re: NSPropertyDescription userInfo - SOLVED
  • Next by Date: Re: NSPropertyDescription userInfo
  • Previous by thread: RE : newbie: adding nibs: i'm stuck
  • Next by thread: Re: RE : newbie: adding nibs: i'm stuck
  • Index(es):
    • Date
    • Thread