Front page | perl.perl6.users |
Postings from March 2023
my zenity adventure
Thread Next
From:
ToddAndMargo via perl6-users
Date:
March 26, 2023 23:35
Subject:
my zenity adventure
Message ID:
259db52d-f839-3457-8ae5-fb307d25a432@zoho.com
Hi All,
Fedora 36
zenity-3.43.0-3.fc37.x86_64
rakudo-pkg-2022.7.0-03.x86_64
My adventure with a zenity call!
I just worked around a problem with a call to zenity:
Note: zenity can not resolve Raku's "\n", so you have to
preformat the "text" field with "sprintf".
$NotifyStr = sprintf "\nStarting $ProgramName\n\nTakes about $Timeout
seconds to finish compiling\nMozilla Mirror = <$MozillaMirror>\n";
The above gave me "All updates are complete" in the text
field. Hmmmmmmmm. I do goof a lot of stuff up (who me????)
but I am "pretty sure" I did not tell zenity that.
I did a direct print of $NotifyStr to the command
line to make sure anyway.
I traced it down to the "<" and ">".
Separating the "<" and ">" with `~ ">" ~` in the string
did not help.
Taking out the "<" and ">" got rid of the problem. Not
as pretty, but it will due.
$NotifyStr = sprintf "\nStarting $ProgramName\n\nTakes about $Timeout
seconds to finish compiling\nMozilla Mirror = $MozillaMirror\n";
The zenity call:
shell "zenity --info --title \"$Title\" --text \"$NotifyStr\"
--width=220 --timeout=$Timeout &";
I was unable to reproduce this from a direct call
to zenity from the command line, so it was probably
something that happened between Raku and zenity.
Of interest, on the direct call "\n" came out as an "S".
Hope this helps someone else.
-T
Thread Next
-
my zenity adventure
by ToddAndMargo via perl6-users