Can Lister-plugin catch File > Reload File event?

Discuss and announce Total Commander plugins, addons and other useful tools here, both their usage and their development.

Moderators: white, Hacker, petermad, Stefan2

Post Reply
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Can Lister-plugin catch File > Reload File event?

Post by *little-brother »

I supposed that on F2 Lister recreates viewport by similar way when user switch from Nultimedia to Text view.
But it doesn't happen. Also I didn't find in a manual how to react on this. Is it possible?
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Can Lister-plugin catch File > Reload File event?

Post by *petermad »

2little-brother
What exactly do you mean by viewport? I only know viewport as a directive in html files
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
User avatar
Stefan2
Power Member
Power Member
Posts: 4132
Joined: 2007-09-13, 22:20 UTC
Location: Europa

Re: Can Lister-plugin catch File > Reload File event?

Post by *Stefan2 »

viewport = a window (form) to a file content in memory (an opened file).

Here the window of the Lister.
little-brother wants to enable F2 -support for his XML view plugin.
viewtopic.php?t=75473
I open a XML file in xmltab, that file is modified in the meantime, I want to use F2 to reload the changed file on the fly...


I have heart about that while learning VIM , googling now I found this explanation:
https //vi.stackexchange com/ questions/11928/what-are-viewport-layout-and-workspace-in-relation-to-tabs?rq=1





 
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: Can Lister-plugin catch File > Reload File event?

Post by *little-brother »

What exactly do you mean by viewport?
The client area of Lister window (the red square on a picture below)
Image: https://i.ibb.co/JFkDcsp/viewport.png
User avatar
petermad
Power Member
Power Member
Posts: 14739
Joined: 2003-02-05, 20:24 UTC
Location: Denmark
Contact:

Re: Can Lister-plugin catch File > Reload File event?

Post by *petermad »

Hmm, it seems to be a restriction of plugins when using the "4 Image/Multimedia" view. If I view an .rtf file using Listers build in function for that (*), then F2 does update the view when the file is changed externally, but not if I view the same file with a plugin.

(*) - Using Listers RTF view is shown in Listers menu as "4 Image/Multimedia"

However if I view an image (.bmp, .gif, .jpg, .png) in lister without using a plugin the F2 has no effect when changing the image externally.
License #524 (1994)
Danish Total Commander Translator
TC 11.03 32+64bit on Win XP 32bit & Win 7, 8.1 & 10 (22H2) 64bit, 'Everything' 1.5.0.1371a
TC 3.50b4 on Android 6 & 13
Try: TC Extended Menus | TC Languagebar | TC Dark Help | PHSM-Calendar
little-brother
Junior Member
Junior Member
Posts: 43
Joined: 2021-09-27, 10:27 UTC

Re: Can Lister-plugin catch File > Reload File event?

Post by *little-brother »

Thanks for this research. Maybe it's a bug?
I can catch F2 and then call ListCloseWindow and ListLoad function to emulate Reload behaviour (it's not fine but should work).
But I also want to menu F2 will work.
P.S. This doesn't work because Lister window lost context (handle of child window).
Post Reply