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 (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:
https://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com

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

Reply via email to