NSOpenPanel trouble with leopard
NSOpenPanel trouble with leopard
- Subject: NSOpenPanel trouble with leopard
- From: Adrien Mondot <email@hidden>
- Date: Mon, 3 Dec 2007 11:01:33 +0100
Hello,
I'm getting some trouble to make my cocoa app work with leopard : I
converted it to Objective C 2.0, it compiles fine, great. However one
critical part don't work as expected at runtime : it's impossible to
make appear any open file dialog.
I changed my code to use one of the leopard samples, so it's very
simple :
- (IBAction) loadConduite:(id)sender
{
NSLog(@"load conduite");
NSString *conduiteFilename;
NSArray *fileTypes = [NSArray arrayWithObjects:@"xml", nil];
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
NSLog(@"after openPanel");
int result = [oPanel runModalForTypes:fileTypes];
if (result == NSOKButton) {
conduiteFilename = [oPanel filename];
NSLog(@"load conduite2b");
//[renderWindow setLevel:2];
[self loadConduiteAtPath:conduiteFilename];
conduiteFilePath = conduiteFilename;
[conduiteFilePath retain];
NSLog(@"load conduite3");
}
else return;
NSLog(@"load conduite4");
}
at runtime the line after NSOpenPanel *oPanel = [NSOpenPanel
openPanel]; is never executed and the program continue normally, like
if the thread for opening just stoped.
Another simple program wih the same code is working properly.
Does someone as any clue or idea of where the problem is ?
Thanks
Adrien
_________________
www.adrienm.net/emotion/
_______________________________________________
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