Hang when Nib is loaded
Hang when Nib is loaded
- Subject: Hang when Nib is loaded
- From: Yakov Zaytsev <email@hidden>
- Date: Fri, 11 May 2007 18:58:40 +0400
I've implemented CocoaInCarbon as it's described in documentation and
placed the code right into my Carbon-ized C application
like this in C source file..
..
initializeCocoa (); // [*]
..
In *.m file I have..
OSStatus initializeCocoa (void)
{
Controller *controller;
NSAutoreleasePool *localPool;
localPool = [[NSAutoreleasePool alloc] init];
controller = [[Controller alloc] init];
[localPool release];
return noErr;
}
Controller init look like this..
- (id) init
{
self = [super init];
NSApplicationLoad(); // Needed for Carbon based
applications which call into Cocoa
if (! [NSBundle loadNibNamed:@"CampaignWindow" owner:self]) {
NSLog(@"failed to load CampaignWindow nib");
}
sharedController = self;
return self;
}
When I activate C-source [*] via menu in my Carbon application it
hangs.. I've looked up this from the GDB being attached to the process..
Shocking endless loop..
#1147 0x0d4709ac in -[Controller init] (self=0x21988710,
_cmd=0x90a511fcQuit
) at /Users/yakovzaytsev/Projects/XDK7.01UB/SampleXTs/BasicInterface
copy/Controller.m:21
objc_super = {
self = 0x21988710,
super_class = 0xa2bdfd38
}
#1148 0x937cd1cc in -[NSCustomObject nibInstantiate] ()
No symbol table info available.
#1149 0x937b7bd4 in -[NSIBObjectData instantiateObject:] ()
No symbol table info available.
#1150 0x937b77a0 in -[NSIBObjectData
nibInstantiateWithOwner:topLevelObjects:] ()
No symbol table info available.
#1151 0x937a3c9c in loadNib ()
No symbol table info available.
#1152 0x937a36f4 in +[NSBundle(NSNibLoading)
_loadNibFile:nameTable:withZone:ownerBundle:] ()
No symbol table info available.
#1153 0x937fabc4 in +[NSBundle(NSNibLoading)
loadNibFile:externalNameTable:withZone:] ()
No symbol table info available.
#1154 0x9388aa70 in +[NSBundle(NSNibLoading) loadNibNamed:owner:] ()
No symbol table info available.
^C#1155 0x0d4709ac in -[Controller init] (self=Quit
) at /Users/yakovzaytsev/Projects/XDK7.01UB/SampleXTs/BasicInterface
copy/Controller.m:21
objc_super = {
self = 0x21987770,
super_class = 0xa2bdfd38
}
#1156 0x937cd1cc in -[NSCustomObject nibInstantiate] ()
No symbol table info available.
#1157 0x937b7bd4 in -[NSIBObjectData instantiateObject:] ()
No symbol table info available.
#1158 0x937b77a0 in -[NSIBObjectData
nibInstantiateWithOwner:topLevelObjects:] ()
No symbol table info available.
#1159 0x937a3c9c in loadNib ()
No symbol table info available.
#1160 0x937a36f4 in +[NSBundle(NSNibLoading)
_loadNibFile:nameTable:withZone:ownerBundle:] ()
No symbol table info available.
#1161 0x937fabc4 in +[NSBundle(NSNibLoading)
loadNibFile:externalNameTable:withZone:] ()
No symbol table info available.
#1162 0x9388aa70 in +[NSBundle(NSNibLoading) loadNibNamed:owner:] ()
No symbol table info available.
^C#1163 0x0d4709ac in -[Controller init] (self=Quit
) at /Users/yakovzaytsev/Projects/XDK7.01UB/SampleXTs/BasicInterface
copy/Controller.m:21
objc_super = {
self = 0x21985940,
super_class = 0xa2bdfd38
}
#1164 0x937cd1cc in -[NSCustomObject nibInstantiate] ()
No symbol table info available.
#1165 0x937b7bd4 in -[NSIBObjectData instantiateObject:] ()
Guys, I've did everything as it described in docs.. Maybe I forgot
some Cocoa-magic word to make it stop looping and do right job
..or at least return nil somewhere in the chain :(
---
Yakov Zaytsev
Envion Software http://www.envionsoftware.com
<Talk Small and Carry a Big Class Library>
_______________________________________________
Cocoa-dev mailing list (email@hidden)
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