On 2020-06-04 04:35, Richard Hainsworth wrote:
Todd,
I wrote you one a very long time ago, after a question from you.
The module is called "Inform". Its on the modules site.
Since it was a long time ago, there may be some bit-rot. Let me know if
there is .
The module should show how to use GTK, and there is a time-out function.
Richard, aka finanalyst
On 04/06/2020 02:55, ToddAndMargo via perl6-users wrote:
Hi All,
Okay, now I know I am pushing it. Can anyone point me to
an example of a GTK information pop up with a time out
feature? Or similar?
Many thanks,
-T
Hi Richard,
Some follow questions:
1) where are the directions? where are the
variable definitions?
in the following:
# my first attempt:
$popup = inform( 'Something cleaver here',
# :buttons(Dismiss => 'Dismiss Test',
:Response('Dismissed'))
# :buttons(Dismiss => 'Dismiss Test'),
# :buttons( OK=>'OK',b2=>'Not on your life',
'Cancel'=> "I don't want to")
:buttons( OK=>'OK Maybe', b2=>'Not on your life' ),
:timer(5),
:title("5 second Countdown test"),
:show-countdown );
print( "popup = <$popup>\n" );
print( "data.response = <$data.response>\n" );
2) why do I have to have more than one button?
`:buttons( OK=>'OK Maybe' )` errors with
Type check failed in binding to parameter
'@buttons'; expected Positional but got Pair
(:OK("OK Maybe"))
3) what is the difference between "buttons" and "response"?
Both of these give two buttons:
:buttons(Dismiss => 'Dismiss Test', :Response('Dismissed'))
4) why am I getting a weird response:
popup = <Informative::Informing<86939520>>
data.response = <Informative::Informing<86939696>.response>
5) What is popup suppose to show?
6) why is it not dismissing after 5 seconds?
7) why is there no "show-countdown"?
Many thanks,
-T