http://www.perlmonks.org?node_id=1013957

ghosh123 has asked for the wisdom of the Perl Monks concerning the following question:

Can anybody please throw some light on ballooninfo if he/she has used it earlier. some hints or pointers or if any one knows any doc on that ....

  • Comment on How to use the BalloonInfo of Tk::Widget.pm

Replies are listed 'Best First'.
Re: How to use the BalloonInfo of Tk::Widget.pm
by zentara (Archbishop) on Jan 18, 2013 at 10:11 UTC
    I just looked at perldoc Tk::Widget, and there is no listing of a BalloonInfo function.

    I'm not really a human, but I play one on earth.
    Old Perl Programmer Haiku ................... flash japh

      Hi zentara,

      If you are looking perl 5.8.8 version, then Tk::Widget of that version you 'll find the BalloonInfo sub routine. I am copy/paste -ing the code below. Even in the Balloon.pm of that version you will find BalloonInfo

      sub BalloonInfo { my ($widget,$balloon,$X,$Y,@opt) = @_; foreach my $opt (@opt) { my $info = $balloon->GetOption($opt,$widget); return $info if defined $info; } }

        ...you 'll find the BalloonInfo sub routine

        but it isn't documented , why do you want to use it?

Re: How to use the BalloonInfo of Tk::Widget.pm
by thundergnat (Deacon) on Jan 18, 2013 at 18:47 UTC

    As has been pointed out earlier, it is an undocumented helper routine used internally primarily in the Balloon.pm module. Since it is undocumented, you really shouldn't use it since there is no guarantee that it won't change. But really, it's a pretty simple routine, you should be able to figure out and/or replicate the functionality easily just by reading the code.

    The primary use seems to be to check the attached -statusmsg and -ballonmsg options (documented in Tk::Balloon under Methods: attach) of the balloon under the pointer and return the first defined value if there is one... though there is nothing preventing you from using it to find the first defined value in any list of the widgets' options, I suppose.

      Thank you all. Your inputs helped
Re: How to use the BalloonInfo of Tk::Widget.pm
by Anonymous Monk on Jan 18, 2013 at 07:51 UTC

    There is a BalloonInfo function in Tk::Widget class. I would like to know how can that function be used in a code...

    It doesn't seem that way, it seems you want somebody to lay it all out for you -- pity