in reply to Re^3: variable access
in thread variable access

passed nothing back from the subroutine? This seems doubtful...

You don't return from a callback :) unless the caller expects you to return ... Tk usually doesn't expect return values from callbacks ... op either needs to stuff $tura into a widget, or another object, which is done by giving it the object/widget as reference, or making the object/widget a global

this means

sub tura { ... $globals{tura} = $tura; ... -browsecmd => [ \&tura, \%globals ], ... sub tura { ... my( $globals_ref ) = @_; $globals_ref->{tura} = $tura; + ... -browsecmd => [ \&tura, \$original_tura ], ... sub tura { ... my( $tura_ref ) = @_; $$tura_ref = $tura;

Replies are listed 'Best First'.
Re^5: variable access
by AnomalousMonk (Archbishop) on Jan 07, 2015 at 00:18 UTC
    -browsecmd=>\&tura

    Ah! I missed the fact that  tura() was a callback. Nevermind...


    Give a man a fish:  <%-(-(-(-<

Re^5: variable access
by aioan1 (Acolyte) on Jan 06, 2015 at 22:35 UTC
    Thank you for trying to help me, in about 8 hours I'll use your indications and let you know if it will be ok.