Re: Delegation methods from NSOpenPanel?
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.