• 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: Interface Builder Problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Interface Builder Problem


  • Subject: Re: Interface Builder Problem
  • From: Lars Sonchocky-Helldorf <email@hidden>
  • Date: Sat, 19 Jan 2002 00:23:21 +0100

Thank you and all the others that helped me in that case. I did as you said and connected all the outlets and actions.

Anyway, after starting the application the menu nib is obviously not loaded, instead a generic menu appears consisting only out of the application menu which even doesn't contain everything I put into the nibs application menu (specially the "About Gomoku" menu item). What I am missing here? Why doesn't the menu nib getting loaded?


On Freitag, Januar 18, 2002, at 06:00 Uhr, Christophe Dore wrote:

I think IB does not want you to instantiate a window directly, as the unarchiving mecanism is different from nonGUI objects.(*)

Drag/drop a window in your nib from the palette, then change its custom class.


(*) think about it
- custom nonGUI objects are initialized with -init method
- custom subclass of NSView with initWithFrame:
- custom subclass of NSWindow with initWithContentRect:styleMask:backing:defer:

how does it work ? because the "proxy" object stored in the nib archive is just of diffrent kind....


Lars Sonchocky-Helldorf wrote:

Hi,
I am new to the list, so please forgive me if my question has been answered recently.
Now my problem: I am porting a small application (Gomoku.app) from GNUstep to Cocoa. While this app uses "hardcoded" menus under GNUstep, I want to use a nib for the menus. So I created the menus in IB and changed the already existing menu actions from (void) to (IBAction) in the .m file and added IBOutlets to the corresponding header file.
Then I imported that class via Read Files from the Classes Menu into Interface Builder. All IBActions and IBOutlets were recognized properly. Then I tried to Instantiate that class to make the connections between the menu and the class. This was not possible since that menu-item of IB was grayed out. Another class of that project did instantiate without problems. The difference of that two classes is that the first is a subclass of NSWindow and the later of NSObject.
How do I instantiate a class in IB that is not a direct subclass of NSObject?

Thanks in advance, Lars
_______________________________________________
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.


  • Follow-Ups:
    • Re: Interface Builder Problem
      • From: Ondra Cada <email@hidden>
References: 
 >Re: Interface Builder Problem (From: Christophe Dore <email@hidden>)

  • Prev by Date: Re: Archiving three arrays
  • Next by Date: Change in document
  • Previous by thread: Re: Interface Builder Problem
  • Next by thread: Re: Interface Builder Problem
  • Index(es):
    • Date
    • Thread