[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [XForms] file selector with callback

From: Jens Thoms Toerring
Subject: Re: [XForms] file selector with callback
Date: Sun, 20 Jun 2010 18:00:13 +0200
User-agent: Mutt/1.5.20 (2009-06-14)

Hi Michal,

On Sun, Jun 20, 2010 at 03:22:23PM +0200, Jens Thoms Toerring wrote:
> On Sun, Jun 20, 2010 at 06:41:44AM +0200, Michal Szymanski wrote:
> > I am a bit confused by the behavior of the file selector with a callback 
> > defined. I got confused playing with demos while giving a try to the 
> > newest version, 1.0.93sp1, namely "pmbrowse" which, when a directory is 
> > double-clicked, prints out an error message (as a directory like ".." is 
> > not a recognized xpm/xbm file, surely) but the file selector does not 
> > change the list of files. Only when I click "Dismiss" button, it shows 
> > the directory I changed to. Is that the expected behavior? If so,
> > how should the callback react to returned file being a directory to get 
> > the file selector refreshed without having to click Dismiss.

As I already wrote at least to me it looks to that selecting a
directory should be handled by the program when in callback-mode,
e.g. by simply calling fl_set_directory() (or do whatever else
may make sense in that situation).

So I changed things so that (in callback-mode):

a) The directory name is now passed back to the program
   tha invoked the file selector
b) The 'Dismiss" button got renamed to "Close" and isn't
   It gets triggered by e.g. the <ESC> key.
c) When you press <RETURN> with a line selected in the
   browser this file (or directory) name gets passed
   back to the calling program.

This should take care of problems for users that don't want to
double-click the mouse:

> > BTW, It seems to me rather strange that a "callbacked" file selector 
> > does not have "Return" button and text input field for entering file 
> > name from the keyboard. While the latter is arguable, the lack of Return 
> > button may be a real problem for users who have problems with operating 
> > the mouse (double click being the only way to select a file).

You can now select a file (or directory) with the up- and down
arrow keys and get it passed back to the caller with <RETURN>.

Concerning the missing input field: We had an input field in
older versions but it never had any effect at all for a file
selector in callback mode, and that's why I threw it out. That
it couldn't do anything was because the "Dismiss" button was
triggered by <RETURN>, so there was no event at which anything
from that input field could have been returned to the caller.
I am now considering to enable it again and return it's con-
tent (unless it's empty) back) to the caller when <RETURN>
is pressed (if it's empty but something is selected in the
browser I would return what's selected in the browser). Does
that sound reasonable?
                           Best regards, Jens
  \   Jens Thoms Toerring  ________      address@hidden
   \_______________________________      http://toerring.de

reply via email to

[Prev in Thread] Current Thread [Next in Thread]