Re: Delegation methods from NSOpenPanel?
Re: Delegation methods from NSOpenPanel?
- Subject: Re: Delegation methods from NSOpenPanel?
- From: Laurent Daudelin <email@hidden>
- Date: Thu, 06 Feb 2003 02:10:04 -0500
on 06/02/03 01:54, Scott Anguish at email@hidden wrote:
>
>
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.
>
Hi Scott and thanks for the reply!
I already listen through that didEndSelector: method, however, at that time,
the panel is just about to be removed from the screen. So, if the user's
selection is invalid, then he'll have to start another open panel session,
which is what I was hoping to avoid...
Thanks anyway!
-Laurent.
--
============================================================================
Laurent Daudelin AIM/iChat: LaurentDaudelin <
http://nemesys.dyndns.org>
Logiciels Nemesys Software
mailto:email@hidden
fix n.,v.: What one does when a problem has been reported too many times to
be ignored.
_______________________________________________
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.