Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re^3: Tk::waitVariableX - AUTOLOAD failed

by hdb (Prior)
on Apr 09, 2013 at 15:40 UTC ( #1027766=note: print w/ replies, xml ) Need Help??


in reply to Re^2: Tk::waitVariableX - AUTOLOAD failed
in thread Tk::waitVariableX - AUTOLOAD failed

The documentation and the code of the module are looking inconsistent. The documentation says:

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

while in the code

sub waitVariableX { use Tie::Watch; my ($parent, $millis) = (shift, shift); # @_ has list of var refs

the arguments have different names (and probably different meaning as well).


Comment on Re^3: Tk::waitVariableX - AUTOLOAD failed
Select or Download Code
Re^4: Tk::waitVariableX - AUTOLOAD failed
by choroba (Abbot) on Apr 09, 2013 at 15:58 UTC
    It is the OO Perl. The first argument is the invocant, the second argument is the interval (but according to the documentation, might as well be an array ref). The rest of the parameters are left in @_ to be used later.

    Handling the array ref:

    if (ref $millis eq 'ARRAY') { $callback = Tk::Callback->new($millis->[1]); $millis = $millis->[0]; }

    Handling the remaining variable references:

    foreach my $vref (@_) {
    لսႽ ᥲᥒ⚪⟊Ⴙᘓᖇ Ꮅᘓᖇ⎱ Ⴙᥲ𝇋ƙᘓᖇ
Re^4: Tk::waitVariableX - AUTOLOAD failed
by jowe (Acolyte) on Apr 09, 2013 at 16:45 UTC
    The module description stems from the 'Mastering Perl/Tk' bible. Both usage formats are described as valid. I choose the more 'simple' one.

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1027766]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others scrutinizing the Monastery: (8)
As of 2014-11-23 19:13 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    My preferred Perl binaries come from:














    Results (134 votes), past polls