• 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
Re: Exception-like behavior in save panel used for file choose
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Exception-like behavior in save panel used for file choose


  • Subject: Re: Exception-like behavior in save panel used for file choose
  • From: Steve Christensen <email@hidden>
  • Date: Fri, 31 Jul 2009 08:38:08 -0700

You could very well be taking an exception. Given this possibility, why haven't you tried wrapping your code in -pushChooseButton: in a @try/@catch block and either just dumping out the exception (if any) and/or putting a breakpoint in the @catch to see what the state of the world is? If you set a breakpoint on -[NSException raise], you can break when the exception actually happens.


On Jul 30, 2009, at 11:04 PM, Barry Press wrote:

I've written a small app that, from a preferences panel, uses a "Choose" button to open a save panel that's used to select the name of the file to which the app will log periodic data. That is, the preferences panel launches via this code:

[...snip...]

This latter code works properly so long as the file that will be the target of the append -- the target of the save panel -- does not exist. In that event, the runModal comes back and I can extract the name. If the file *does* exist, however, then a panel comes up that asks if it's ok to replace the file, and if I agree to replace, not only the choose panel closes, so does my settings panel - I'm dumped all the way back to the app that invoked showPreferencePane.

I looked at the methods being fired, and nothing much interesting comes up. I see

panel:directoryDidChange:
panel:userEnteredFilename:confirmed:
panel:isValidFilename:

and by then the windows are all closed. Any ideas on why the panel closes around me?
_______________________________________________

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: Exception-like behavior in save panel used for file choose
      • From: Kyle Sluder <email@hidden>
References: 
 >Exception-like behavior in save panel used for file choose (From: Barry Press <email@hidden>)

  • Prev by Date: Re: How to tell other controller that orientationDidChange
  • Next by Date: Re: Converting colors to CGFloat
  • Previous by thread: Exception-like behavior in save panel used for file choose
  • Next by thread: Re: Exception-like behavior in save panel used for file choose
  • Index(es):
    • Date
    • Thread