• 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
loadNibNamed:owner
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

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


  • Follow-Ups:
    • Re: loadNibNamed:owner
      • From: Fritz Anderson <email@hidden>
    • Re: loadNibNamed:owner [Pilot Error]
      • From: David Blanton <email@hidden>
  • Prev by Date: Re: Trying to achieve aperture PopUp buttons
  • Next by Date: Re: property setters and getters with different types
  • Previous by thread: Not responding in activity viewer
  • Next by thread: Re: loadNibNamed:owner [Pilot Error]
  • Index(es):
    • Date
    • Thread