Problems with BrowseEntry module 
Author Message
 Problems with BrowseEntry module

Hi,

Because of unknown reason, BrowseEntry handles the -browsecmd argument
as an array of CODE instead of just CODE, and therefore it doesn't work
for me...

when I try this code:

.
.
.

$var = "test";
my $test = $fr->BrowseEntry(-label => "Label", -variable=> \$var,
-browsecmd => sub {print "test\n";} )->form;
$test->insert('end',"choice1");
$test->insert('end',"choice2");

.
.
.

It creates the widget ok, but when I choose an option using the
BrowseEntry widget, I get this message:

Tk::Error: Not a CODE reference at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
203, <FLOW> chunk 48.
  Tk::BrowseEntry::LbChoose at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
203
  Tk::BrowseEntry::ListboxRelease at
/usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
101

Is it a problem with my installation of this module? with me? y2k bug?
invasion from Mars?

thanks in advance,
Amir.



Fri, 05 Jul 2002 03:00:00 GMT  
 Problems with BrowseEntry module

Quote:

> Hi,
> Because of unknown reason, BrowseEntry handles the -browsecmd argument
> as an array of CODE instead of just CODE, and therefore it doesn't work
> for me...
> when I try this code:
> .
> .
> .
> $var = "test";
> my $test = $fr->BrowseEntry(-label => "Label", -variable=> \$var,
> -browsecmd => sub {print "test\n";} )->form;
> $test->insert('end',"choice1");
> $test->insert('end',"choice2");
> .
> .
> .
> It creates the widget ok, but when I choose an option using the
> BrowseEntry widget, I get this message:
> Tk::Error: Not a CODE reference at
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
> 203, <FLOW> chunk 48.
>   Tk::BrowseEntry::LbChoose at
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
> 203
>   Tk::BrowseEntry::ListboxRelease at
> /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
> 101
> Is it a problem with my installation of this module? with me? y2k bug?
> invasion from Mars?

Callback handling was "tweaked" not so long ago, and a few widgets needed
a patch.  Check the mailing list archives for the string "Callback" for a
BrowseEntry patch ... oh, try this:

http://www.xray.mpe.mpg.de/mailing-lists/ptk/1999-07/msg00038.html



Fri, 05 Jul 2002 03:00:00 GMT  
 Problems with BrowseEntry module
Thank you very much !!!!!!!!!!!!!!!!!!!!!
Quote:


> > Hi,

> > Because of unknown reason, BrowseEntry handles the -browsecmd argument
> > as an array of CODE instead of just CODE, and therefore it doesn't work
> > for me...

> > when I try this code:

> > .
> > .
> > .

> > $var = "test";
> > my $test = $fr->BrowseEntry(-label => "Label", -variable=> \$var,
> > -browsecmd => sub {print "test\n";} )->form;
> > $test->insert('end',"choice1");
> > $test->insert('end',"choice2");

> > .
> > .
> > .

> > It creates the widget ok, but when I choose an option using the
> > BrowseEntry widget, I get this message:

> > Tk::Error: Not a CODE reference at
> > /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
> > 203, <FLOW> chunk 48.
> >   Tk::BrowseEntry::LbChoose at
> > /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
> > 203
> >   Tk::BrowseEntry::ListboxRelease at
> > /usr/local/lib/perl5/site_perl/5.005/sun4-solaris/Tk/BrowseEntry.pm line
> > 101

> > Is it a problem with my installation of this module? with me? y2k bug?
> > invasion from Mars?

> Callback handling was "tweaked" not so long ago, and a few widgets needed
> a patch.  Check the mailing list archives for the string "Callback" for a
> BrowseEntry patch ... oh, try this:

> http://www.xray.mpe.mpg.de/mailing-lists/ptk/1999-07/msg00038.html



Fri, 05 Jul 2002 03:00:00 GMT  
 Problems with BrowseEntry module

Quote:

> Thank you very much !!!!!!!!!!!!!!!!!!!!!


...

Quote:

>> Callback handling was "tweaked" not so long ago, and a few widgets needed
>> a patch.  Check the mailing list archives for the string "Callback" for a
>> BrowseEntry patch ... oh, try this:

>> http://www.xray.mpe.mpg.de/mailing-lists/ptk/1999-07/msg00038.html

And I thank Achim for his wonderful, searchable, archives.


Fri, 05 Jul 2002 03:00:00 GMT  
 Problems with BrowseEntry module

Quote:

> Hi,

> Because of unknown reason, BrowseEntry handles the -browsecmd argument
> as an array of CODE instead of just CODE, and therefore it doesn't work
> for me...

Try Tk 800.015 or 800.017.

Regards,
        Slaven

--
use Tk;$c=tkinit->Canvas(-he,20)->grid;$x=5;map{s!\n!!g;map{create$c 'line'=>
map{$a=-43+ord;($x+($a>>3)*2=>5+($a&7)*2)}split''}split"!";$x+=12}split/_/=>'K
PI1_+09IPK_K;-OA1_+K!;A__1;Q!7G_1+QK_3CLPI90,_+K!;A_+1!KQ!.N_K+1Q!.F_1+KN.Q__1+
KN._K+1Q!.F_1+KN.Q_+1Q__+1!KQ!.N_1;Q!7G_K3,09Q_+1!K.Q_K+1Q!.F_1+KN.Q_';MainLoop



Fri, 05 Jul 2002 03:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. New Module: Tk::DDTList - sophisticated Tk::BrowseEntry

2. BrowseEntry problem

3. BrowseEntry problem

4. BrowseEntry Problem

5. TK::BrowseEntry problems

6. version problems with Tk::Scrollbar or Tk::BrowseEntry

7. Font assignment problem BrowseEntry

8. Problems with BrowseEntry

9. module install problems with cpan module and gcc?

10. Tk::LabEntry and Tk:: BrowseEntry

11. Tk::BrowseEntry - Return index instead of value?

12. Tk::BrowseEntry - Return index instead of value?

 

 
Powered by phpBB® Forum Software