• 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: Delegation methods from NSOpenPanel?
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Delegation methods from NSOpenPanel?


  • Subject: Re: Delegation methods from NSOpenPanel?
  • From: Scott Anguish <email@hidden>
  • Date: Thu, 6 Feb 2003 01:54:05 -0500

On Thursday, February 6, 2003, at 12:50 AM, Laurent Daudelin wrote:

Hi all!

I would need to have my delegate gets a message whenever the user has hit
the OK button or hit Return in an NSOpenPanel. I looked at the doc and saw
that NSOpenPanel inherits from NSSavePanel, and NSSavePanel has this
delegation method 'panel:userEnteredFilename:confirmed:' that seemed to be
the one to do the trick. Unfortunately, although NSOpenPanel does send at
least one delegation method that it inherits from NSSavePanel, it sadly
doesn't send the 'panel:userEnteredFilename:confirmed:' method that I would
need.


The user never really enters the filename in the NSOpenPanel


If you just want to run the open panel with a certain action being taken when the user hits OK or cancel, you should use

 beginSheetForDirectory:file:types:modalForWindow:modalDelegate:didEndSel ector:contextInfo:

The didEndSelector will be called when OK or Cancel is hit, and you can determine the appropriate action.
_______________________________________________
cocoa-dev mailing list | email@hidden
Help/Unsubscribe/Archives: http://www.lists.apple.com/mailman/listinfo/cocoa-dev
Do not post admin requests to the list. They will be ignored.
  • Follow-Ups:
    • Re: Delegation methods from NSOpenPanel?
      • From: Laurent Daudelin <email@hidden>
References: 
 >Delegation methods from NSOpenPanel? (From: Laurent Daudelin <email@hidden>)

  • Prev by Date: Re: Question about TableView - how do I know which tableView?
  • Next by Date: Re: Question about TableView - how do I know which tableView?
  • Previous by thread: Delegation methods from NSOpenPanel?
  • Next by thread: Re: Delegation methods from NSOpenPanel?
  • Index(es):
    • Date
    • Thread