TSE: Issue: 'List File Open': option <ALT W> WriteFile seems not to work

5 views
Skip to first unread message

knud van eeden

unread,
Mar 2, 2023, 5:23:48 AM3/2/23
to SemWare TSE Pro Text Editor
Hello

1. In the menu of 'File' > 'List Open...' > <ALT W> WriteFile

this option does/shows nothing.

2. Expected: Should show something and do something.

with friendly greetings
Knud van Eeden

Inline image

S.E. Mitchell

unread,
Mar 2, 2023, 5:50:26 PM3/2/23
to sem...@googlegroups.com
Hmmm.  This one works for me, I use it all the time:
I have 3 files open - all have been changed:

image.png

I press <alt-w> on file3:

image.png

Now the asterisk has gone away.  And, when I check on disk, the file has been updated.

And looking at the listopen code for savefile, it looks ok:

image.png

Not sure why it isn't working for you.  But do note that it won't bother to save a file that does not have the changed flag set.

--

--

---
You received this message because you are subscribed to the Google Groups "SemWare TSE Pro text editor" group.
To unsubscribe from this group and stop receiving emails from it, send an email to semware+u...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/semware/1064733569.3264113.1677752624976%40mail.yahoo.com.

knud van eeden

unread,
Mar 2, 2023, 6:47:57 PM3/2/23
to SemWare TSE Pro Text Editor
Solution:

a. The issue is caused by having spurious '-' defined in the footer.

b. Also adding a 'SaveFile' option is a PIECE OF CAKE.

c. Steps to do

1. Backup the file <TSE>\mac\listopen.s 

2. Open the file <TSE>\mac\listopen.s

3. Locate the line

FILELIST_FOOTER[] = "{F1}-Help {Enter}-EditFile  {Del}-QuitFile  {Alt-S}-SortList  {Alt-W} WriteFile  {Escape}-Cancel"

4. First and for all remove the spurious dashes in the 'Alt-...}, thus:

FILELIST_FOOTER[] = "{F1}-Help {Enter}-EditFile  {Del}-QuitFile  {Alt S}-SortList  {Alt W} WriteFile  {Escape}-Cancel"

5. Then adding a 'SaveFile' option

FILELIST_FOOTER[] = "{F1}-Help {Enter}-EditFile  {Del}-QuitFile  {Alt F} SaveFile {Alt S}-SortList  {Alt W} WriteFile  {Escape}-Cancel"

6. Then add at the 'keydef' something similar to this to implement that 'SaveFile':

<Alt f>     PushPosition() PushBlock() SaveAs( "c:\temp\ddd1.txt", _OVERWRITE_ ) Warn( "Saved as c:\temp\ddd1.txt" ) PopPosition() PopBlock()

7. Choosing that option <Alt F> will then successfully save the plain text of the open files to a text file.

knud van eeden

unread,
Mar 2, 2023, 7:12:32 PM3/2/23
to sem...@googlegroups.com
OK, that should then not be an issue, I expected some kind of text message informing about what was happening, but there is not much of that thus. So it should be alright.

Thanks

knud van eeden

unread,
Mar 2, 2023, 8:41:34 PM3/2/23
to sem...@googlegroups.com
Regarding the file <TSE>\mac\listopen.s

1. I found one issue more. That is <alt l> (see below) has been forgotten to add in the 'footer' menu in listopen.s. 
That actually has that 'Save List' functionality thus. 
It is / was already there.


2. Further in order to inform / feedback to the customer e.g. adding a Message():

E.g.

keydef FileListKeys
    <Alt e>     Message( "Edit" ) EndProcess(TRUE)
    <Del>       Message( "Quit File" ) EndProcess(kQUITFILE)
    <Alt r>     Message( "Rename" ) EndProcess(kRENAME)
    <Alt f>     Message( "Save List" ) PushPosition() PushBlock() SaveAs( "c:\temp\ddd1.txt", _OVERWRITE_ ) Warn( "Saved as c:\temp\ddd1.txt" ) PopPosition() PopBlock()
    <Alt w>     Message( "Save File" ) EndProcess(kSAVEFILE)
    <Alt s>     Message( "Sort List" ) sort_list()
    <Ctrl c>    Message( "Copy to Windows clipboard" ) EndProcess(kCOPYTOWINCLIP)
    <Ctrl Ins>  Message( "Copy to Windows clipboard" ) EndProcess(kCOPYTOWINCLIP)
    <Ctrl v>    Message( "Smartview" ) SmartViewFile()
    <Grey+>     Message( "Copy" ) EndProcess(kCOPY)
    <alt l>     Message( "Save List Open" ) AddHistoryStr("listopen.txt", _EDIT_HISTORY_) SaveListOpen()
    <F1>        QuickHelp(listopen_help)
end

Thanks
with friendly greetings
Knud van Eeden

knud van eeden

unread,
Mar 2, 2023, 8:50:04 PM3/2/23
to sem...@googlegroups.com
OK, it might be that it is/was thus a deliberate decision not to add <ALT L> to the 'footer' menu.

It is instead (only) visible for the user when he/she presses <F1> for help.

If so the case can be rested.

Thanks

Reply all
Reply to author
Forward
0 new messages