Re: NSOpenPanel trouble with leopard
Re: NSOpenPanel trouble with leopard
- Subject: Re: NSOpenPanel trouble with leopard
- From: Corbin Dunn <email@hidden>
- Date: Mon, 03 Dec 2007 12:46:17 -0800
On Dec 3, 2007, at 9:45 AM, Adrien Mondot wrote:
Hi and thanks for your answer...
maybe it's a newbie question but :
This function is called via a connection made in Interface Builder,
isn't it supposed to be executed in the main thread ?
In my app, I use a displayLink thread for rendering, so I changed
the code for something like this (adding CVDisplayLinkStop)
- (IBAction) loadConduite:(id)sender
{
CVDisplayLinkStop(_displayLink);
NSString *conduiteFilename;
NSArray *fileTypes = [NSArray arrayWithObjects:@"xml", nil];
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
int result = [oPanel runModalForTypes:fileTypes];
if (result == NSOKButton) {
conduiteFilename = [oPanel filename];
[self loadConduiteAtPath:conduiteFilename];
}
else return;
CVDisplayLinkStart(_displayLink);
}
However it still doesn't work.
During the call to the
NSOpenPanel *oPanel = [NSOpenPanel openPanel];
the console start to dump some errors :
2007-12-03 18:32:07.155 eMotion[1724:10b] NSOutlineView Warning:
reloadData called while in the middle of doing a reloadData!
and continue to dump this line at each rendering loop (60 times/s)
But I really don't understand why a request for openPanel can make
some error in other objects of my app ?!?
It sounds like something is causing a bug in the open panel, for some
reason.
Can you:
1. Launch your app in GDB, or the debugger in Xcode.
2. Reproduce the problem, and as soon as it starts happening, "break"
in gdb (ctrl-c at the command line, or "pause" in xcode).
After you do that, please reply back with the backtrace. This will
help me pinpoint what the problem is, and I may be able to offer a
work around.
corbin
_______________________________________________
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