On 2011-02-23, at 23:36 , Stephen J. Butler wrote:

> On Wed, Feb 23, 2011 at 10:26 PM, Louis Demers <louisdem...@mac.com> wrote:
>>  I instantiate a NSWindowController with the nib file name and call 
>> showWindow on it.
>> 
>> myWindowController = [[NSWindowController alloc] 
>> initWithWindowNibName:@"myWindowXIB" owner: someObject ];
>> 
>> My window and its content show up but when I ask the windowController for 
>> the window pointer it returns null. So I can't do anything else with the 
>> window.  I'm not using an NSDocument stuff...  Any clues ?
> 
> In IB, is File's Owner class NSWindowController? Did you wire your
> window to the File's Owner _window outlet? It doesn't happen
> automatically (plus, a nib could contain more than one window if you
> wanted).

No, in my xib, the File's Owner type is set to a custom Object which has some 
IBOutlet that I connect the gui elements to!
Then, when I call

myWindowController = [[NSWindowController alloc] 
initWithWindowNibName:@"myWindowXIB" owner: someObject ];

I pass that object along as the owner.

Do you mean I can only set the File's Owner type to a NSWindowController class ?


Louis Demers eng.
www.obzerv.com


_______________________________________________

Cocoa-dev mailing list (Cocoa-dev@lists.apple.com)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

This email sent to arch...@mail-archive.com

Reply via email to