in reply to WxPerl and accessing subroutine return variables without direct call of subroutine

When you register/set up the handlers, ask yourself what is $self? What is @_ in the event handlers?

Now ask yourself where you should store values important to your application?

:D its all about $self, $self is your stash, if there is a live child of $self , you let the $child keep its own value (which you can GetValue), for temporary children no longer alive (like $dialog ), you store the value important to you in $self, say  $self->{dir_in} = $dir_in;

Make sense?

  • Comment on Re: WxPerl and accessing subroutine return variables without direct call of subroutine
  • Download Code

Replies are listed 'Best First'.
Re^2: WxPerl and accessing subroutine return variables without direct call of subroutine
by Kyshtynbai (Sexton) on Jun 21, 2014 at 09:35 UTC
    Please give me a second to comprehend this. Is it correct: I can set $dir_in like this $self->{dir_in} = $dir_in; inside a subroutine, and then call $dir_in from main subroutine? But how exactly does this call look?

      and then call $dir_in from main subroutine? But how exactly does this call look?

      There is no "calls", its a variable, ita a hashref, perlintroPerl variable types, Hashes

        At last I've got it. This -> little arrow confused me. Thanks a lot good sir, not it works as it should.