Am 31.12.21 um 16:12 schrieb Rich:
Torsten <[email protected]> wrote:
In a wish started in a terminal or in TkCon the initial output is:
0 3.22 >><<
5.0 6.22 >><<
Under Linux, in a terminal, this is the output on the first try:
2.0 3.22 >>3 17 56 14 11<<
5.0 6.22 >>3 59 56 14 11<<
So the lack of output may be a windows issue.
Only at the second attempt, dlineinfo returns the values. It always
happens in my program. In TkCon it works sometimes.
What's wrong here?
Try an "update" before you do your first attempt under windows. Maybe
some portion of the update events are not finished running yet when
your first try occurs.
Not quite right, Rich! You have probably used an interactive tclsh or
wish. If the script is contained in a file, say, test.tcl, and you
execute it via "tclsh test.tcl" or "wish test.tcl", then its behavior on
Linux will be the same as on Windows: on both platforms, the dlineinfo
result will be an empty string. The reason is contained in the last
sentence of the description of the dlineinfo command in the "text" man page:
"If the display line containing _index_ is not visible on the screen
then the return value is an empty list."
To get a non-empty dlineinfo result, you have to make sure that the
display line containing the index passed to the command is visible on
the screen. You can achieve this by inserting
tkwait visibility .txt1
or
update idletasks
before the foreach loop.
--
Csaba Nemethi
https://www.nemethi.de mailto:
[email protected]
--- SoupGate-Win32 v1.05
* Origin: fsxNet Usenet Gateway (21:1/5)