Re: getOpenFile etc. wish-list
Available news archives: comp.lang.tcl - comp.lang.python - comp.security.firewalls - sci.crypt - comp.lang.php - comp.lang.javascript
Google
 
Web news.hping.org


comp.lang.tcl archive

Re: getOpenFile etc. wish-list

From: Torsten Reincke <reincke@typoscriptics.de>
Date: Tue Feb 28 2006 - 11:45:14 CET

> Eckhard Lehmann wrote:
> > So my question and a first point on my wish-list for these dialogs
> > would be to have an -exclude option that glob's or regex'es directories
> > not to show, so that I can for instance say:
> >
> > tk_getOpenFile -initialdir $::env(HOME) -exclude ".*"
>
> Actually, the best thing is to add something to the dialog to turn
> off/on display of "hidden" files (defaulting to off, of course). This
> could then be done without an API change, and hence wouldn't require a
> TIP (and porting to the other platforms we support).

This is how TkRat (www.tkrat.org, written by Martin Forssén) does it.
There is a checkbox in the upper
right of the dialog which can be used to toggle the state of hidden
files. Veeeeery useful indeed!

 It should be easy to pull the code out from this software and
incorporate it into the core dialog. I do not know, jowever, what
license is associated with this code. The relevant file is called
rat_fbox.tcl and there is code in the rat_fbox::create procedure which
builds the gui element:

    checkbutton $f1.dot -text . -variable ${dataName}(showDotfiles) \
                -command "rat_fbox::updateWhenIdle $w"

and sure code elsewhere to make the magic happen. All this could be a
nice starting point!

Torsten
Received on Sun Apr 30 02:17:33 2006