awakeFromNib is not called in Tiger [PPC], but called in Leopard [Intel]
awakeFromNib is not called in Tiger [PPC], but called in Leopard [Intel]
- Subject: awakeFromNib is not called in Tiger [PPC], but called in Leopard [Intel]
- From: Alexander Shmelev <email@hidden>
- Date: Tue, 25 Nov 2008 20:23:05 +0300
Hello,
I have nib file "TwainDialog.nib" which is controlled by
TwainDialogController class (inherited from NSWindowController).
When I run on 10.5 Leopard, everything works as expected: awakeFromNib
is called, outlets initialized, [twainDialog window] returns NSWindow
pointer.
But when I run my code on 10.5 Tiger, everithing go wrong:
awakeFormNib is not called, even when window displayed; [twainDialog
window] crashes my application.
Application is UB with 10.4 SDK for Intel and 10.3.9 SDK for PPC.
Xcode 3.1.1.
How to get -awakeFromNib and -window working on 10.4 (PowerPC)?
Here is my code.
--- AppController.mm ---
- (void) showUiAsModal:(BOOL)isModal
{
if (!twainDialog) // twainDialog = nil in -init method
twainDialog = [[TwainDialogController alloc] init];
[twainDialog window]; // if uncommented, then crash in Tiger, but
passed in Leopard
[twainDialog showWindow:self];
...
}
--- TwainDialogController ---
@implementation TwainDialogController
- (id)init
{
CHECKPOINT;
if (![super initWithWindowNibName:@"TwainDialog"])
return nil;
...
return self;
}
- (void)awakeFromNib
{
// never gets here :(
abort(); // so this function is never called
}
@end
BR, Alexander
_______________________________________________
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