From: Ross_Boyd@tnt.com.au
Hi again,
I tried your suggestion and whattayaknow!
And out of appreciation I have included an undocumented feature I
discovered a while back.
To determine what prompt you are in, you simply query(CurrHistoryList).
This works for user-defined history lists also.
See snippet below:
===============================
proc OnPickFileCleanUp()
// Test that this is a filename history list.
if Query(CurrHistoryList) in _EDIT_HISTORY_,_NEWNAME_HISTORY_
,_EXECMACRO_HISTORY_,_LOADMACRO_HISTORY_
// Lower-case the returned value from PickFile()
// to avoid duplicates in the history list
PushBlock()
MarkLine()
Lower()
PopBlock()
endif
end
===============================
Thanks for your help Chris,
Ross
----------
From: chrisant
To: Ross.Boyd; tsepro
Subject: RE: Case-sensitive Filenames
Date: Monday, 5 January 1998 15:57
if you hook _PROMPT_CLEANUP_, you can do it there.
inside of a hook proc for _PROMPT_CLEANUP_, the current buffer is the
prompt itself, and the current line is the contents of the prompt. (be
careful not to touch anything but the current line!!). you can replace
the contents of the current line with something else, and that will be
returned as the result from the prompt. so you could do your
lowercasing there. you may want some extra logic to control when to do
the lowercasing, though -- might not want all prompts to always return
lowercase text. (for instance, maybe use GetStrXY to get the first few
characters of the prompt message [File(s) to edit:] and only do the
lowercasing if the first n characters match "File(s)" or "File" or
something).
hope this helps.
-----Original Message-----
From: Ross_Boyd@tnt.com.au [mailto:Ross_Boyd@tnt.com.au]
Sent: Monday, January 05, 1998 3:07 PM
To: Chris Antos (Exchange); tsepro@semware.com
Subject: RE: Case-sensitive Filenames
Hi Chris,
Sorry, I didn't make that very clear.
I was talking about the history lists - specifically those that store
filenames.
Yes I already do lower-case the filenames and expand their path before
they get saved to history.
The point is, that with TSE 2.8, when you use to bring up a
PickFile() dialog and select a file it doesn't seem to allow me to
Lower()/expand the filename.
See the 'scenario' below.
So, I was kinda hoping that someone might know a workaround for this.
Just as I think of it, maybe I can Hook into the _PICKFILE_STARTUP_
event and lower-case the filenames in the Pick Buffer.
I'll give that a try.
You know, sometimes just verbalising a problem can lead to an answer.
Funny that.
Thanks for your feedback.
Kind Regards,
Ross :-)
----------
From: chrisant
To: Ross.Boyd; tsepro
Subject: RE: Case-sensitive Filenames
Date: Monday, 5 January 1998 13:54
sounds like you're talking about the history lists. by default, they
just take verbatim what you type.
you mentioned you've already modified it so the history lists always
store full pathnames. if you want them to always use lower case, why
not add that modification to the one you already made?
-----Original Message-----
From: Ross_Boyd@tnt.com.au [mailto:Ross_Boyd@tnt.com.au]
Sent: Sunday, January 04, 1998 10:05 PM
To: tsepro@semware.com
Subject: Case-sensitive Filenames
Hi all,
Is there any reason for filenames to be case-sensitive in the poup file
picklist?
I ask this question because I am trying to avoid a situation where the
history list contains duplicate filenames ie. one is mixed-case and the
other is upper-case say.
It annoys me to have duplicates in the filename history lists and I
want to somehow stop this from happening.
Here is the scenario:
1) I select Edit File
2) I type in "C:\" and then hit
3) TSE displays a PickFile list.
4) I select AUTOEXEC.BAT (say)
5) If I look at my EditFile history it will now contain C:\AUTOEXEC.BAT
(It may also be contain a "c:\autoexec.bat")
I want to somehow Lower() the returned filename at step 4 above which
would avoid the duplicate.
Anyone got any ideas?
Just as a by-line, I have already forced all file history lists to
store the entire path of the edited file so that it matters not which
directory I am in when I select the file again from the history list.
Semware please note: This would be an excellent builtin
configuration feature for TSE.
Regards,
Ross
---
---------------
* Origin: apana>>>>>fidonet [sawasdi.apana.org.au] (3:800/846.13)
|