Article View: news.software.readers
Article #259603Re: 40tude Dialog: Anyway to keep it from deleting local copies of articles?
From: VanguardLH
Date: Wed, 30 Sep 2015 20:50
Date: Wed, 30 Sep 2015 20:50
120 lines
6285 bytes
6285 bytes
Bernd Rose wrote:
> On Wed, 30 Sep 2015 01:21:44 -0500, VanguardLH wrote:
>
>> Alas, OnGroupEntered event doesn't seem to trigger when I click on a
>> newsgroup in the tree pane. [...] What I found through further
>> testing is that I have to remain in a newsgroup for about 5 seconds
>> before switching away to another newsgroup for this event to fire.
>
> No. With your sample code you just wait for the next screen refresh to
> show your changes. Your code needs to explicitly fire up the refresh:
>
> ;---------------------------------------------------------------------
> program OnGroupEntered;
>
> procedure OnGroupEntered(sName: string);
> begin
> if sName<>'news.software.readers' then
> begin
> ADo('View1');
> ADo('RefreshView');
> end
> else
> begin
> ADo('View2');
> ADo('RefreshView');
> end;
> end;
>
> begin
> end.
> ;---------------------------------------------------------------------
>
> This example works fine and acts immediately. A short remark to Lock/Unlock:
> This is only necessary to /prevent/ screen updates, esp. when a large number
> of screen relevant actions in a row may cause an unwanted screen flicker. In
> your case it is counterproductive... - In case you wonder, why this didn't
> cause problems in the LButtonUp-Script: LButtonUp acts before any drawing
> in the header pane (to reflect the group change) occurs. OnGroupEntered acts
> just a little bit later.
>
> Bernd
I remember trying to find documentation on all the lib functions
available within scripts for Dialog. Never found it. The usual
response is Dialog is written in Delphi. That doesn't help in knowing
the global functions, vars, or other objects that have been defined only
with Dialog to know how to program the scripts. Did the author ever
documented scripting so users would know how to program them for use
within the scope for the scripts? For example, in Dialog's help about
scripting, it mentions:
function ADo(actionname: string): boolean;
//Trigers a command in Dialog
Okay, so ADo() calls some command. Where is the list of commands?
Header syntax for a function does not describe what the function does or
delineates the arguments to the function.
Thanks for the tip on refresh. There's no way I would've know about it.
I forget how I ever figured out the ADo() function. Mostly likely I
looked at someone else's script to figure it out. Dialog's help is
cursory so it isn't sufficiently complete to figure out how to write
scripts from scratch.
However, refresh did not eliminate the lag. If I click on a newsgroup,
change its view, and then click on other newsgroups, the last view used
in the first newsgroup is still used. My code (a bit simplified from
your example) is:
if GroupName <> 'Repository' then
begin
ADo('View6');
ADo('RefreshView');
end;
I don't want the view changed in the Repository folder when I visit a
different newsgroup; i.e., I'd like whatever view last used in
Repository to be the same upon return to that folder. So I only change
the view when I look in folders other than Repository. Alas, unless I
dally around in a newly selected newsgroup for 5-15 seconds, the view
will be the same when I click on a different newsgroup. In fact, the
view will only change to the one specified when I click on a different
newsgroup, dally there (where the old view remains no matter how long I
wait), and then focus on a different newsgroup.
Click on newsgroup #1. Change the view. Click on newsgroup #2. The
view there is the same as selected in newsgroup #1. Dally there for 5,
10, 15, 60 seconds. The view still does not change to what was
specified in the OnGroupEntered script. Only after dallying in
newsgroup #2 long enough will clicking on newsgroup #3 give the view
specified in OnGroupEntered. If I change the view in newsgroup #1 and
don't dally in any newsgroup that I click on thereafter, the view
selected for newsgroup #1 gets used in all the other newgroups.
It's like the ADo("RefreshView") never happened. In fact, with that
command added, I see no behavior change from what I described before.
Perhaps the RefreshView action is supposed to repaint the screen but it
doesn't happen. So I tried putting the lock/unlockdisplay commands back
in to see if maybe those would force a repaint, as in:
lockdisplay;
try
if GroupName <> 'Repository' then
begin
ADo('View6');
ADo('RefreshView');
end;
finally
unlockdisplay;
end;
Didn't help. Still have the lag problem: have to dally in next selected
newsgroup (where view change won't happen) so next selected newsgroup
will have view applied.
You sure RefreshView is a valid command for ADo to execute? There is no
buffering of ADo() functions (i.e., they get queued and another function
is needed to force any pending buffered commands to execute)?
Technical Details
Message-ID:
<d73091F6h7gU1@mid.individual.net>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mailReferences:
<d6optbFjbkcU1@mid.individual.net> <d6ugo3F1q7fU1@mid.individual.net> <1cob0aematw94$.dlg@b.rose.tmpbox.news.arcor.de> <d71armFnem8U1@mid.individual.net> <d71dbpFo17tU1@mid.individual.net> <fhvxoml4nsbc.dlg@b.rose.tmpbox.news.arcor.de>Show Full Headers
Complete Article Headers
Message-ID: <d73091F6h7gU1@mid.individual.net> Subject: Re: 40tude Dialog: Anyway to keep it from deleting local copies of articles? Date: Wed, 30 Sep 2015 15:50:40 -0500 From: VanguardLH <V@nguard.LH> References: <d6optbFjbkcU1@mid.individual.net> <d6ugo3F1q7fU1@mid.individual.net> <1cob0aematw94$.dlg@b.rose.tmpbox.news.arcor.de> <d71armFnem8U1@mid.individual.net> <d71dbpFo17tU1@mid.individual.net> <fhvxoml4nsbc.dlg@b.rose.tmpbox.news.arcor.de> Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!illumos!news.pugleaf.net!.TX!archive.pugleaf.net!archive.newsdeef.eu!mbox2nntp-news.software.readers.(126883).mbox.7z!not-for-mail X-Received: by 10.140.237.202 with SMTP id i193mr5039029qhc.10.1443646242812; Newsgroups: news.software.readers Organization: Usenet Elder Lines: 120 Sender: VanguardLH <> Mime-Version: 1.0 X-Trace: individual.net LjSdYhjJxBkYPbpAyyX+cwdseZampbYU+i7O4XxppnA8Wtkce6 Keywords: VanguardLH VLH811 Cancel-Lock: sha1:zdEfpx2D9zZkXCI5+EkpDFSQ7n0= User-Agent: 40tude_Dialog/2.0.15.41 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Received-Bytes: 6164 X-Received-Body-CRC: 3522540233