• 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
Re: loadNibNamed deprecated, but newer version crashes
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: loadNibNamed deprecated, but newer version crashes


  • Subject: Re: loadNibNamed deprecated, but newer version crashes
  • From: Charles Srstka <email@hidden>
  • Date: Sun, 18 Sep 2016 19:48:43 -0500

What’s the crash? Is it an exception? If so, what’s the description that gets posted to the console?

Charles

> On Sep 18, 2016, at 6:35 PM, Gabriel Zachmann <email@hidden> wrote:
>
> I would like to replace this line of code:
> 	[NSBundle loadNibNamed: @"ConfigureSheet" owner: self];
>
> by the newer version loadNibNamed: owner:topLevelObjects:.
>
> This runs in a screensaver. The deprecated version (loadNibNamed:owner:) works.
> The new version causes a crash.
> Here are the variants I have tried:
>
> 1.
>
> NSBundle * bundle = [NSBundle bundleForClass:[self class]];
> NSArray * nibArray = nil;
> [bundle loadNibNamed: @"ConfigureSheet" owner: self topLevelObjects: &nibArray];
>
> 2.
>
> NSBundle * bundle = [NSBundle bundleForClass:[self class]];
> [bundle loadNibNamed: @"ConfigureSheet" owner: self topLevelObjects: nil;
>
> 3.
>
> [[NSBundle mainBundle] loadNibNamed: @"ConfigureSheet" owner: self topLevelObjects: nil];
>
>
>
> I must be missing something.
>
> I have checked the API docs, but I didn't see any hints. I have googled extensively, to no avail.
>
> Any hints, pointers, suggestions will be highly appreciated.
>
> Best regards,
> Gabriel.
>
>
> _______________________________________________
>
> 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


  • Follow-Ups:
    • Re: loadNibNamed deprecated, but newer version crashes
      • From: Gabriel Zachmann <email@hidden>
References: 
 >How to make Xcode launch a different app when "Running" my code? (From: Gabriel Zachmann <email@hidden>)
 >Re: How to make Xcode launch a different app when "Running" my code? (From: "Pascal J. Bourguignon" <email@hidden>)
 >loadNibNamed deprecated, but newer version crashes (From: Gabriel Zachmann <email@hidden>)

  • Prev by Date: Re: Package installation on MacOS Sierra
  • Next by Date: Re: How to make Xcode launch a different app when "Running" my code?
  • Previous by thread: loadNibNamed deprecated, but newer version crashes
  • Next by thread: Re: loadNibNamed deprecated, but newer version crashes
  • Index(es):
    • Date
    • Thread