• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Weird problem: Application terminates unexpectedly after closing NSOpenPanel sheet
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Weird problem: Application terminates unexpectedly after closing NSOpenPanel sheet


  • Subject: Weird problem: Application terminates unexpectedly after closing NSOpenPanel sheet
  • From: "Oleg Krupnov" <email@hidden>
  • Date: Fri, 9 Jan 2009 09:54:04 +0200

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?
_______________________________________________

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

  • Follow-Ups:
    • Re: Weird problem: Application terminates unexpectedly after closing NSOpenPanel sheet
      • From: Corbin Dunn <email@hidden>
  • Prev by Date: Re: Problem sending notification from C callback function
  • Next by Date: Re: Resetting the TableView
  • Previous by thread: [SOLVED] Re: NSPersistentStoreCoordinator Wars Episode I: The Phantom Lock Menace
  • Next by thread: Re: Weird problem: Application terminates unexpectedly after closing NSOpenPanel sheet
  • Index(es):
    • Date
    • Thread