Skip navigation.
 
mlRe: Interface Builder Problem
FROM : Henri Lamiraux
DATE : Fri Jan 18 18:31:50 2002

You cannot directly instantiate NSWindow(s) and subclasses of NSWindow
in IB. What looks like a NSWindow is IB is in fact a template for the
Window. You need to drag a NSWindow from the palette and change its
custom class (from the custom class inspector).

On Friday, January 18, 2002, at 07:17  AM, 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_removed>
> Help/Unsubscribe/Archives:
> http://www.lists.apple.com/mailman/listinfo/cocoa-dev
> Do not post admin requests to the list. They will be ignored.



Related mailsAuthorDate
mlInterface Builder Problem Lars Sonchocky-Hel… Jan 18, 16:17
mlRe: Interface Builder Problem Christophe Dore Jan 18, 18:00
mlRe: Interface Builder Problem Henri Lamiraux Jan 18, 18:31
mlRe: Interface Builder Problem Lars Sonchocky-Hel… Jan 19, 00:23
mlRe: Interface Builder Problem Ondra Cada Jan 19, 00:51
mlRe: Interface Builder Problem Lars Sonchocky-Hel… Jan 19, 05:26