Page 2 of 3
Re: 'hide files' option
Posted: 30 Jan 2009 13:06
by admin
lastnikita wrote:that was it, works fine with latest build, thanks.
would be cool to be able to name them, I'll check the catalog option meanwhile..
last one, any syntax for hiding folder this way please ?
(so I can group all of those under catalog)
There is none yet. But if I'm not wrong I could
add one, namely to prefix "*|" for this. Since * would be nonsense as a normal VF there are no ambiguities.
Code: Select all
\|a* = Show all folders and all files beginning with a
\|!* = Show all folders
*|a* = Show all files and all folders beginning with a
*|!* = Show all files
Good?
Re: 'hide files' option
Posted: 30 Jan 2009 13:33
by jjk
admin wrote: Good ?
This seems perfect. TIA.
lastnikita wrote: any syntax for hiding folder this way please ?
(so I can group all of those under catalog)
According to a script of Jacky and Pagat, which applies a VF on selected files/folders
Code: Select all
"&Filter Current Selection"
end 0==getinfo("CountSelected"), "No selection !", 1;
replace $sel, report('"{Name}"|', 1), "[", "[[]";
replace $sel, $sel, "#", "[#]";
filter $sel;
status "Selection filtered";
you could first select only files, then apply this above VF, finally invert selection by this script
Code: Select all
::sel f;
end 0==getinfo("CountSelected"), "No selection !", 1;
replace $sel, report('"{Name}"|', 1), "[", "[[]";
replace $sel, $sel, "#", "[#]";
filter $sel;
status "Selection filtered";
sel i
I didn't checked it in all cases.
Waiting Don's solution which comes later, this is perhaps a workaround.
Re: 'hide files' option
Posted: 30 Jan 2009 13:58
by admin
jjk wrote:admin wrote: Good ?
This seems perfect. TIA.
Yep, works well! Already implemented & documented.

See near the bottom of this page:
http://www.xyplorer.com/release_7.90.htm#0100
Upload coming...
Re: 'hide files' option
Posted: 30 Jan 2009 14:57
by jacky
admin wrote:Good?
Yeah. And just for the record, if someone is trying to show all files and only files, aka hide folders, there's no need to use any VF, just disable option "Show folders in list" under ConfigGeneral (also available on Toolbar as button "Hide Folders") and folders don't show on List.

Re: 'hide files' option
Posted: 30 Jan 2009 15:20
by admin
jacky wrote:admin wrote:Good?
Yeah. And just for the record, if someone is trying to show all files and only files, aka hide folders, there's no need to use any VF, just disable option "Show folders in list" under ConfigGeneral (also available on Toolbar as button "Hide Folders") and folders don't show on List.

Yep. Of course that's a global setting. The VF works tabwise.
Re: 'hide files' option
Posted: 30 Jan 2009 15:49
by TheQwerty
admin wrote:There is none yet. But if I'm not wrong I could
add one, namely to prefix "*|" for this. Since * would be nonsense as a normal VF there are no ambiguities.
Code: Select all
\|a* = Show all folders and all files beginning with a
\|!* = Show all folders
*|a* = Show all files and all folders beginning with a
*|!* = Show all files
Good?
Quite frankly... no. What was wrong with the syntax I
suggested?
Then you could have:
Code: Select all
\|a* = All Folders; Files beginning with a
\|!* = All Folders; No FIles
\a*|* = Folders beginning with a; All Files
\!*|* = No Folders; All Files
\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
It might be a slightly longer pattern but I think it's much clearer about how the pattern is being applied, especially when used as a quick VF.
Re: 'hide files' option
Posted: 30 Jan 2009 15:53
by admin
TheQwerty wrote:Code: Select all
\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
Sure: a*

Re: 'hide files' option
Posted: 30 Jan 2009 16:05
by admin
admin wrote:TheQwerty wrote:Code: Select all
\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
Sure: a*

I think the current syntax is very simple and sufficient for all practical purposes. I don't see much use in applying different patterns to folders and files. But it's good that one can now easily show all folders while filtering the files.
Re: 'hide files' option
Posted: 30 Jan 2009 16:33
by j_c_hallgren
Comment on examples there: It's a tiny thing but if you could show the first 4 examples both as used in VF entry and AB, I think it would make it clearer...as the section talks about VF but examples are for the AB, and some users may never enter it in AB but just use VF entry.
Maybe put the AB ex first and then the VF entry to the right, with a comment in section hdg?
Also, I would put the phrase about the first "|" at end of section heading as it gets a bit lost in 1st ex text.
Re: 'hide files' option
Posted: 30 Jan 2009 16:45
by TheQwerty
admin wrote:TheQwerty wrote:Code: Select all
\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
Sure: a*

Doh.. But "\b*|a*" isn't possible.
admin wrote:I think the current syntax is very simple and sufficient for all practical purposes. I don't see much use in applying different patterns to folders and files. But it's good that one can now easily show all folders while filtering the files.
I think it's very confusing to overload * with so many different meanings.
It can mean only apply the following patterns to folders.
It can be a wildcard to allow anything.
It can be in a regular expression to allow 0 or more of the last group/character.
It can be in a regular expression as itself (pointless but possible).
This makes documenting its use more difficult, and it's much more awkward for the user.
Further, if you ever do see a use in applying different patterns to files and folders, you've made it harder to take that step.
The other advantage of the syntax I suggested is it is much more inline with the rules already being applied in PFA/POM.
Re: 'hide files' option
Posted: 30 Jan 2009 17:08
by j_c_hallgren
TheQwerty wrote:admin wrote:Code: Select all
\|a* = Show all folders and all files beginning with a
\|!* = Show all folders
*|a* = Show all files and all folders beginning with a
*|!* = Show all files
Good?
Quite frankly... no. What was wrong with the syntax I
suggested?
Then you could have:
Code: Select all
\|a* = All Folders; Files beginning with a
\|!* = All Folders; No FIles
\a*|* = Folders beginning with a; All Files
\!*|* = No Folders; All Files
\a*|a* = Folders beginning with a; Files beginning with a
Looking at this a nbr of times and the examples given elsewhere, and based on TheQwerty's comment re overuse of "*", I'm agreeing that the second set above makes it easier to follow, as the standard is thus "Folder|File", whereas the other way (as shown on htm#100) , it could be either way so it's more ambiguous as to what is meant, at least as I read it.
Having said that, given that asterisk represents wildcard, could one be used as alternate/optional syntax in this for folders (with their pattern being delimited by backslash to the first pipe)?
So that
\|a* and
\*|a* give same, as would
\|!* and
\*|!* ?
So the absence of the "\|" and any patterns within that would mean that the filter would apply to both folders and files...
Re: 'hide files' option
Posted: 30 Jan 2009 19:35
by admin
TheQwerty wrote:admin wrote:TheQwerty wrote:Code: Select all
\a*|a* = Folders beginning with a; Files beginning with a (Is this even possible with your syntax?)
Sure: a*

Doh.. But "\b*|a*" isn't possible.
admin wrote:I think the current syntax is very simple and sufficient for all practical purposes. I don't see much use in applying different patterns to folders and files. But it's good that one can now easily show all folders while filtering the files.
I think it's very confusing to overload * with so many different meanings.
It can mean only apply the following patterns to folders.
It can be a wildcard to allow anything.
It can be in a regular expression to allow 0 or more of the last group/character.
It can be in a regular expression as itself (pointless but possible).
This makes documenting its use more difficult, and it's much more awkward for the user.
Further, if you ever do see a use in applying different patterns to files and folders, you've made it harder to take that step.
The other advantage of the syntax I suggested is it is much more inline with the rules already being applied in PFA/POM.
PFA/POM: "A single backslash (\) will match all folders." Well, that's in line with the current VF syntax as well.
I don't find the current syntax so awkward, and it's certainly easier to implement than yours, which is another hint that it cannot be so over-complicated as you seem to think.
BTW, currently I see no good way to
exclude all folders AND filter the files. This needs yet another new prefix,
!\|, e.g.
Code: Select all
!\|*.txt -> show no folders and only text files
With your syntax this would not be possible at all since the inversion operator is only implemented for the whole expression, not for each term.
Re: 'hide files' option
Posted: 30 Jan 2009 19:52
by jacky
hmm.. acc. to TheQwerty's syntax, wouldn't this show no folders and only text files ?
He doesn't seem to be using the "!" for the full pattern but one for folders and another one for files: (which means it's not like the usual way and thus could get gets confusing, one thinking it's stops at the pipe sign or something...)
Code: Select all
\|!* = All Folders; No FIles
\!*|* = No Folders; All Files
Not that I like this syntax better, or not, I'm just saying. AFAIC the current way allows for most common stuff, and to do things like exclude all folders AND filter the files I personally would use the "Hide Folders" TB icon, as for filtering files and folders differently, honestly, I don't think I ever do that.
Re: 'hide files' option
Posted: 30 Jan 2009 20:02
by admin
jacky wrote:hmm.. acc. to TheQwerty's syntax, wouldn't this show no folders and only text files ?
He doesn't seem to be using the "!" for the full pattern but one for folders and another one for files: (which means it's not like the usual way and thus could get gets confusing, one thinking it's stops at the pipe sign or something...)
Code: Select all
\|!* = All Folders; No FIles
\!*|* = No Folders; All Files
Not that I like this syntax better, or not, I'm just saying. AFAIC the current way allows for most common stuff, and to do things like exclude all folders AND filter the files I personally would use the "Hide Folders" TB icon, as for filtering files and folders differently, honestly, I don't think I ever do that.
This
would not work with the current implementation or documented rules because the ! operator is applied on the term level, not the whole expression. I would have to rewrite the whole thing and the documentation. VF works as it is since many years now - I don't see the need to rewrite everything just to be able to accomplish to filter folders and files by different filters at the same time.
"Hide Folders" TB icon is okay, but as I said before, works globally. Instead, it might be nice to have a
tab (or Favorite etc) pointing at TXT files and hiding all folders. This pattern (available from next version) is an easy and quite intuitive way to achieve this, I think:
Re: 'hide files' option
Posted: 30 Jan 2009 20:27
by jacky
admin wrote:This
would not work with the current implementation or documented rules because the ! operator is applied on the term level, not the whole expression. I would have to rewrite the whole thing and the documentation. VF works as it is since many years now - I don't see the need to rewrite everything just to be able to accomplish to filter folders and files by different filters at the same time.
Yeah I know, but it seems to be the syntax TheQwerty was proposing, no? I was just saying that with his syntax this is how it would work (unless I got it wrong).
admin wrote:"Hide Folders" TB icon is okay, but as I said before, works globally. Instead, it might be nice to have a
tab (or Favorite etc) pointing at TXT files and hiding all folders. This pattern (available from next version) is an easy and quite intuitive way to achieve this, I think:
Well, just Tab, Favorites & such support scripting so it could be done anyways, just it's not tab-wise no
So, what about
to show no files, and only folders starting with an "a" then? You know, to be complete
