loadNibNamed:owner
loadNibNamed:owner
- Subject: loadNibNamed:owner
- From: David Blanton <email@hidden>
- Date: Tue, 2 Mar 2010 14:53:43 -0700
I have a nib file named Hoops.
In this nib is an NSPanel.
Outlets and Actions are defined in Files Owner and connected to the
Panel.
In code I create an object that has the corresponding Outlets /
Actions as File's Owner.
I then loadNibNamed:owner with owner as the object just created.
I then crash with EXC_BAD_ACCESS ...
The code:
MDlgHoops* dlg = [[MDlgHoops alloc] init];
bool ok = [NSBundle loadNibNamed:@"Hoops" owner:dlg];
if(ok)
[NSApp runModalForWindow:dlg->m_hoops]; // m_hoops is a panel
else
NSRunAlertPanel(nil, @"The Hoop Size dialog could not be
displayed.", nil, nil, nil);
[dlg->m_hoops orderOut:self];
Shouldn't this just load the nib and connect the outlets / actions in
File's Owner to dlg?
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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:
This email sent to email@hidden