zentara wrote:
> The first is that you cannot count on a sub call always passing
> the caller. In some languages, like gtk2, when you call a sub,
> $_[0] is always the widget that called it. But in Tk, sometimes it is,
> and sometimes it isn't. If in doubt, just print @_ in your subs and
> see
Greetings,
16.12.2003, R. Joseph Newton wrote:
> There is no decoding happening. Entry is a Tk widget. It is not a
> string. The string contents are a property held in the widget's hash.
> The get method is an accessor function that returns this value. AFAIK, Tk
> does not use the sort of de
Oliver Schaedlich wrote:
> Greetings,
>
> 15.12.2003, zentara wrote:
>
> > $main ->> Button
> > ( -text => 'Add',
> > -command => sub{\&add_item($var1,$var2)}
> > ) -> pack;
> [...]
> > sub add_item {
> [...]
> >my $entry1 = $_[0]->get();
> >my $entry2 = $_[1]->get();
> [...]
Oliver Schaedlich wrote:
> > my $win = MainWindow->new(height => 150, -width => 250);
>
> Hmm, are you sure this works?
[blushin' deep red] Uh, no, actually, I'm pretty sure it doesn't. The
MainWindow seems to grow only to the size dictated by its geometry
manager to hold all the controls to be
Greetings,
thanks for your reply.
16.12.2003, R. Joseph Newton wrote:
> What does perldoc Tk::Entry tell you?
a) that there is a doc for Entry in the first place - I didn't
know that, only read the main TK documentation. ^^;
b) Now that I read it, hmm, not much I'm afraid. Either I missed
Greetings,
15.12.2003, zentara wrote:
> $main ->> Button
> ( -text => 'Add',
> -command => sub{\&add_item($var1,$var2)}
> ) -> pack;
[...]
> sub add_item {
[...]
>my $entry1 = $_[0]->get();
>my $entry2 = $_[1]->get();
[...]
> }
thanks for your reply. I tried this out and i
Oliver Schaedlich wrote:
> Greetings,
>
> 15.12.2003, [EMAIL PROTECTED] wrote:
>
> >$mw->>Button (-text=>"run",
> > -command=> sub {test($rb_val,$bonobo,$oracleid)})
> > ->place(-x=>320,-y=>>250 ,-width=>75);
>
> thanks for your reply.
>
> I tried to adapt to your example:
>
> $main->Butto
Schaedlich <[EMAIL PROTECTED]>
15/12/2003 12:41
Please respond to Oliver Schaedlich
To: [EMAIL PROTECTED]
cc:
Subject: Re: pass vars to sub via TK/Button
Greetings,
15.12.2003, [EMAIL PROTECTED] wrote:
>$mw->>Button (-text=>"run",
&g
Greetings,
15.12.2003, [EMAIL PROTECTED] wrote:
>$mw->>Button (-text=>"run",
> -command=> sub {test($rb_val,$bonobo,$oracleid)})
> ->place(-x=>320,-y=>>250 ,-width=>75);
thanks for your reply.
I tried to adapt to your example:
$main->Button
( -text => 'Add',
-command => sub
Here is how I do it
$mw->Button (-text=>"run",
-command=> sub {test($rb_val,$bonobo,$oracleid)})->place(-x=>320,
-y=>250 ,-width=>75);
Laurent coudeur
Oliver Schaedlich <[EMAIL PROTECTED]>
15/12/2003 11:27
Please respond to Oliver Schaedlich
To: [EMAIL PROTECTED]
10 matches
Mail list logo