Re: loadNibNamed:owner [Pilot Error]
Re: loadNibNamed:owner [Pilot Error]
- Subject: Re: loadNibNamed:owner [Pilot Error]
- From: David Blanton <email@hidden>
- Date: Tue, 2 Mar 2010 15:43:13 -0700
I inadvertently set a view in the nib to the class I was instancing.
Sorry for the noise.
-db
On Mar 2, 2010, at 2:53 PM, David Blanton wrote:
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
_______________________________________________
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