waitVariableX(3pm)

πŸ“¦
version 1.0 Β· 2 versions
  • 1.0 Β· debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking (latest)
  • 1.0 Β· ubuntu jammy
, in debian bookworm, debian trixie, ubuntu noble, ubuntu resolute, ubuntu stonking

πŸ’– NAME πŸ’–

okay so bestie, meet Tk::waitVariableX β€” it's literally a waitVariable with extensions, fr fr. That's the whole vibe. It lives in the perl/Tk Documentation corner of the world and its manual page goes by waitVariableX(3pm). 🫢


✨ SYNOPSIS ✨

use Tk::waitVariableX;

$splash->waitVariableX( [$millis, $destroy_splashscreen], \$v1, \$v2} );

πŸ¦‹ DESCRIPTION πŸ¦‹

So this subroutine waits for a list of variables, but with a timeout in the mix. It comes back to you the moment one of those variables changes value, <em>or</em> when the timeout runs out β€” whichever one happens first. No cap, it's just first-come-first-served between "something changed" and "time's up". ⏰

Now here's the thing about that millisecond parameter: even though it is required, it's allowed to be zero, and a zero there means no timeout at all. The millisecond parameter can also be an array of two elements β€” element one is the millisecond value, and element two is a normal Per/Tk callback. That callback gets invoked just before waitVariableX returns. πŸ‘‘

And the callback format? It's patterned after the Perl/Tk scheme, so you've got two options: hand over a code reference, <em>or</em> hand over an array reference and pass the callback code reference as the first element of that array, followed by the callback arguments. Pick your fighter, both slay. πŸ’…


Copyright (C) 2000 - 2002 Stephen O. Lidie. All rights reserved.

This program is free software; you can redistribute it and/or modify it under the same terms as Perl itself. 🌈


and that's the whole page, bestie πŸ¦‹ β€” this was Tk::waitVariableX from the Tk1.0 era, dated 2022-06-28, and the manual page itself answers to waitVariableX(3pm). go forth and wait on your variables with impeccable main character energy. periodt. πŸ’–βœ¨πŸŽ€