On Jan 8, 2009, at 11:54 PM, Oleg Krupnov wrote:
Here is my code:
//-------------------------------------------------------------------------------------------------
- (IBAction)scanFolder:(id)sender
{
NSOpenPanel* openPanel = [NSOpenPanel openPanel];
[openPanel setCanChooseDirectories:YES];
[openPanel setCanChooseFiles:NO];
[openPanel setAllowsMultipleSelection:NO];
[openPanel beginSheetForDirectory:nil
file:nil
modalForWindow:[sourceView window]
modalDelegate:self
didEndSelector:@selector
(openPanelDidEnd:returnCode:contextInfo:)
contextInfo:NULL];
}
//-------------------------------------------------------------------------------------------------
- (void)openPanelDidEnd:(NSOpenPanel*)panel returnCode:(int)returnCode
contextInfo:(void*)contextInfo
{
if (returnCode == NSOKButton)
{
[self activatePath:[[panel filenames] objectAtIndex:0]];
}
}
It puzzles me that the application is terminated unexpectedly without
any error messages in the console after the stack is unwinded up from
the openPanelDidEnd function.
What might I be doing wrong?
_______________________________________________
It's hard to say. Use the debugger and add a breakpoint on
objc_exception_throw. Then, look at the bt when the crash occurs (on
Leopard).
corbin
_______________________________________________
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:
http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com
This email sent to arch...@mail-archive.com