tcltk-perl Mailing List for tcltk (Page 7)
Brought to you by:
hobbs
You can subscribe to this list here.
2004 |
Jan
|
Feb
|
Mar
|
Apr
(174) |
May
(34) |
Jun
(1) |
Jul
|
Aug
(20) |
Sep
(18) |
Oct
(8) |
Nov
(6) |
Dec
(14) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2005 |
Jan
(16) |
Feb
(8) |
Mar
(3) |
Apr
(1) |
May
(9) |
Jun
(1) |
Jul
(4) |
Aug
(7) |
Sep
(1) |
Oct
|
Nov
|
Dec
|
2006 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(2) |
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2008 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
2009 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
(12) |
Dec
|
2010 |
Jan
|
Feb
|
Mar
(1) |
Apr
|
May
|
Jun
(1) |
Jul
(1) |
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2012 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(1) |
Jun
|
Jul
(1) |
Aug
(1) |
Sep
(1) |
Oct
(1) |
Nov
|
Dec
|
2013 |
Jan
(1) |
Feb
(1) |
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(3) |
Sep
|
Oct
|
Nov
|
Dec
|
2014 |
Jan
|
Feb
|
Mar
|
Apr
|
May
(1) |
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
(1) |
Nov
|
Dec
|
2015 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
(3) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2016 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2017 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
(2) |
Jun
(1) |
Jul
(1) |
Aug
(2) |
Sep
|
Oct
|
Nov
|
Dec
|
2018 |
Jan
|
Feb
(1) |
Mar
|
Apr
(1) |
May
(1) |
Jun
(1) |
Jul
(1) |
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
2019 |
Jan
|
Feb
|
Mar
|
Apr
(1) |
May
|
Jun
(1) |
Jul
|
Aug
(1) |
Sep
(2) |
Oct
|
Nov
|
Dec
|
2020 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
(1) |
Nov
|
Dec
|
2021 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(1) |
Oct
|
Nov
|
Dec
|
2024 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
From: Paul F. <fa...@ca...> - 2004-09-07 20:24:59
|
Ok, I've solved all my issues save one. It seems that to save a Canvas need the Photo method. That is part of tkimg. Is there somewhere I can get binaries of tkimg for Wince for both ARM and Mips processors? On Fri, Sep 03, 2004 at 04:07:52PM -0700, Jeff Hobbs wrote: > The following is a working translation of the Tcl doodle code. > There are others ways to express some of this stuff, but this > works: > > #!/usr/bin/perl > > use Tcl::Tk qw/:perlTk/; > my $mw = MainWindow->new(); > my $c = $mw->Canvas(-background => "white") > ->pack(-fill => 'both', -expand => 1); > > our $id; > doodle($c); > > MainLoop; > > sub doodle { > my ($w, $color) = @_; > my $color = "black" unless defined $color; > Tcl::Tk::bind($w->interp, $w, '<1>', > [\&doodle_start, Tcl::Ev('%x', '%y'), $w, $color]); > Tcl::Tk::bind($w->interp, $w, '<B1-Motion>', > [\&doodle_move, Tcl::Ev('%x', '%y'), $w]); > # bind $w <1> [list doodle'start %W %x %y $color] > # bind $w <B1-Motion> {doodle'move %W %x %y} > } > > sub doodle_start { > my ($x, $y, $w, $color) = @_; > $id = $w->create('line', $x, $y, $x, $y, -fill => $color); > # set ::_id [$w create line $x $y $x $y -fill $color] > } > > sub doodle_move { > my ($x, $y, $w) = @_; > my @coords = $w->coords($id); > unshift @coords, $x, $y; > $w->coords($id, @coords); > # $w coords $::_id [concat [$w coords $::_id] $x $y] > } > > Jeff Hobbs, The Tcl Guy > http://www.ActiveState.com/, a division of Sophos > > > -----Original Message----- > > From: Paul Falbe [mailto:fa...@ca...] > > Sent: Thursday, September 02, 2004 8:52 AM > > To: Jeff Hobbs > > Cc: tcl...@li... > > Subject: Re: [tcltk-perl] Package Img > > > > > > > > here is my simplistic attach at bind to canvas. I Can't get it to > > for for "<1>". > > > > #!/usr/bin/perl > > > > use Tcl::Tk qw/:perlTk/; > > my $MW = MainWindow->new(); > > my $C = $MW->Canvas(-height => '100', > > -width => '100' )->pack(-fill => 'both'); > > my $f = $C->Frame->pack; > > my $c =$f->Canvas(-width => '100', > > -height => '100', > > -highlightthickness => 0, > > -background => "#ffffff")->pack; > > $c->bind('canvas', '<1>', \&foo); > > > > MainLoop; > > > > sub foo { > > print "foo\n"; > > } > > > > On Thu, Sep 02, 2004 at 08:20:14AM -0700, Jeff Hobbs wrote: > > > Paul Falbe wrote: > > > > > > >Would you happen to have a example of a scribble program > > using perl Tcl/TK? > > > > > > Not in Perl Tcl::Tk, but this is so simple the translation should > > > be easy: > > > > > > From http://wiki.tcl.tk/9625 > > > > > > proc doodle {w {color black}} { > > > bind $w <1> [list doodle'start %W %x %y $color] > > > bind $w <B1-Motion> {doodle'move %W %x %y} > > > } > > > proc doodle'start {w x y color} { > > > set ::_id [$w create line $x $y $x $y -fill $color] > > > } > > > proc doodle'move {w x y} { > > > $w coords $::_id [concat [$w coords $::_id] $x $y] > > > } > > > pack [canvas .c -bg white] -fill both -expand 1 > > > doodle .c > > > bind .c <Double-3> {%W delete all} > > > > > > Anyone undertaking the exercise should post it back here for > > > others to see the translation. > > > > > > -- > > > Jeff Hobbs, The Tcl Guy > > > http://www.ActiveState.com/, a division of Sophos > > |
From: Paul F. <fa...@ca...> - 2004-09-07 14:00:23
|
Jeff, Nevermind on the file list on your Tcl/Tk installation. Found it was my bad. I didn't put the "lower" subroutine into the Tk.pm for my MIPS device. One strange thing on your doodle.pl It works great on my i386 Linux box which has tcl/tk 8.4.7 but on my CASIO which has 8.4.4 all lines start from the upper left-hand corner. Any ideas?? I still need to know how to save my doodle to a GIF/PNG. And it seems I can do things like this my @loadfiles = <\\Storage Card\\myapp\\files\\*.txt>; How do you get a list of files with perl58m on wince devices? Thanks! -Paul On Fri, Sep 03, 2004 at 04:07:52PM -0700, Jeff Hobbs wrote: > The following is a working translation of the Tcl doodle code. > There are others ways to express some of this stuff, but this > works: > > #!/usr/bin/perl > > use Tcl::Tk qw/:perlTk/; > my $mw = MainWindow->new(); > my $c = $mw->Canvas(-background => "white") > ->pack(-fill => 'both', -expand => 1); > > our $id; > doodle($c); > > MainLoop; > > sub doodle { > my ($w, $color) = @_; > my $color = "black" unless defined $color; > Tcl::Tk::bind($w->interp, $w, '<1>', > [\&doodle_start, Tcl::Ev('%x', '%y'), $w, $color]); > Tcl::Tk::bind($w->interp, $w, '<B1-Motion>', > [\&doodle_move, Tcl::Ev('%x', '%y'), $w]); > # bind $w <1> [list doodle'start %W %x %y $color] > # bind $w <B1-Motion> {doodle'move %W %x %y} > } > > sub doodle_start { > my ($x, $y, $w, $color) = @_; > $id = $w->create('line', $x, $y, $x, $y, -fill => $color); > # set ::_id [$w create line $x $y $x $y -fill $color] > } > > sub doodle_move { > my ($x, $y, $w) = @_; > my @coords = $w->coords($id); > unshift @coords, $x, $y; > $w->coords($id, @coords); > # $w coords $::_id [concat [$w coords $::_id] $x $y] > } > > Jeff Hobbs, The Tcl Guy > http://www.ActiveState.com/, a division of Sophos > > > -----Original Message----- > > From: Paul Falbe [mailto:fa...@ca...] > > Sent: Thursday, September 02, 2004 8:52 AM > > To: Jeff Hobbs > > Cc: tcl...@li... > > Subject: Re: [tcltk-perl] Package Img > > > > > > > > here is my simplistic attach at bind to canvas. I Can't get it to > > for for "<1>". > > > > #!/usr/bin/perl > > > > use Tcl::Tk qw/:perlTk/; > > my $MW = MainWindow->new(); > > my $C = $MW->Canvas(-height => '100', > > -width => '100' )->pack(-fill => 'both'); > > my $f = $C->Frame->pack; > > my $c =$f->Canvas(-width => '100', > > -height => '100', > > -highlightthickness => 0, > > -background => "#ffffff")->pack; > > $c->bind('canvas', '<1>', \&foo); > > > > MainLoop; > > > > sub foo { > > print "foo\n"; > > } > > > > On Thu, Sep 02, 2004 at 08:20:14AM -0700, Jeff Hobbs wrote: > > > Paul Falbe wrote: > > > > > > >Would you happen to have a example of a scribble program > > using perl Tcl/TK? > > > > > > Not in Perl Tcl::Tk, but this is so simple the translation should > > > be easy: > > > > > > From http://wiki.tcl.tk/9625 > > > > > > proc doodle {w {color black}} { > > > bind $w <1> [list doodle'start %W %x %y $color] > > > bind $w <B1-Motion> {doodle'move %W %x %y} > > > } > > > proc doodle'start {w x y color} { > > > set ::_id [$w create line $x $y $x $y -fill $color] > > > } > > > proc doodle'move {w x y} { > > > $w coords $::_id [concat [$w coords $::_id] $x $y] > > > } > > > pack [canvas .c -bg white] -fill both -expand 1 > > > doodle .c > > > bind .c <Double-3> {%W delete all} > > > > > > Anyone undertaking the exercise should post it back here for > > > others to see the translation. > > > > > > -- > > > Jeff Hobbs, The Tcl Guy > > > http://www.ActiveState.com/, a division of Sophos > > |
From: Paul F. <fa...@ca...> - 2004-09-07 13:09:53
|
Works great. How could I dump results to a file in GIF/PNG format. And clear pad and load an image. Also, I am going to go back again and try and get my MIPS based CASIO working again. You said I should make sure I have a proper TCL/TK directory structure. Is there any way you could do a File listing of your /Storage Card/ Tcl/Tk directory so I can compare. Also, any chance of a output of something like for $key ( keys %ENV ) { print "$key $ENV{$key}\n"; } I would think between those 2 things should be able to fix not being able to fix bwidget access. On Fri, Sep 03, 2004 at 04:07:52PM -0700, Jeff Hobbs wrote: > The following is a working translation of the Tcl doodle code. > There are others ways to express some of this stuff, but this > works: > > #!/usr/bin/perl > > use Tcl::Tk qw/:perlTk/; > my $mw = MainWindow->new(); > my $c = $mw->Canvas(-background => "white") > ->pack(-fill => 'both', -expand => 1); > > our $id; > doodle($c); > > MainLoop; > > sub doodle { > my ($w, $color) = @_; > my $color = "black" unless defined $color; > Tcl::Tk::bind($w->interp, $w, '<1>', > [\&doodle_start, Tcl::Ev('%x', '%y'), $w, $color]); > Tcl::Tk::bind($w->interp, $w, '<B1-Motion>', > [\&doodle_move, Tcl::Ev('%x', '%y'), $w]); > # bind $w <1> [list doodle'start %W %x %y $color] > # bind $w <B1-Motion> {doodle'move %W %x %y} > } > > sub doodle_start { > my ($x, $y, $w, $color) = @_; > $id = $w->create('line', $x, $y, $x, $y, -fill => $color); > # set ::_id [$w create line $x $y $x $y -fill $color] > } > > sub doodle_move { > my ($x, $y, $w) = @_; > my @coords = $w->coords($id); > unshift @coords, $x, $y; > $w->coords($id, @coords); > # $w coords $::_id [concat [$w coords $::_id] $x $y] > } > > Jeff Hobbs, The Tcl Guy > http://www.ActiveState.com/, a division of Sophos > > > -----Original Message----- > > From: Paul Falbe [mailto:fa...@ca...] > > Sent: Thursday, September 02, 2004 8:52 AM > > To: Jeff Hobbs > > Cc: tcl...@li... > > Subject: Re: [tcltk-perl] Package Img > > > > > > > > here is my simplistic attach at bind to canvas. I Can't get it to > > for for "<1>". > > > > #!/usr/bin/perl > > > > use Tcl::Tk qw/:perlTk/; > > my $MW = MainWindow->new(); > > my $C = $MW->Canvas(-height => '100', > > -width => '100' )->pack(-fill => 'both'); > > my $f = $C->Frame->pack; > > my $c =$f->Canvas(-width => '100', > > -height => '100', > > -highlightthickness => 0, > > -background => "#ffffff")->pack; > > $c->bind('canvas', '<1>', \&foo); > > > > MainLoop; > > > > sub foo { > > print "foo\n"; > > } > > > > On Thu, Sep 02, 2004 at 08:20:14AM -0700, Jeff Hobbs wrote: > > > Paul Falbe wrote: > > > > > > >Would you happen to have a example of a scribble program > > using perl Tcl/TK? > > > > > > Not in Perl Tcl::Tk, but this is so simple the translation should > > > be easy: > > > > > > From http://wiki.tcl.tk/9625 > > > > > > proc doodle {w {color black}} { > > > bind $w <1> [list doodle'start %W %x %y $color] > > > bind $w <B1-Motion> {doodle'move %W %x %y} > > > } > > > proc doodle'start {w x y color} { > > > set ::_id [$w create line $x $y $x $y -fill $color] > > > } > > > proc doodle'move {w x y} { > > > $w coords $::_id [concat [$w coords $::_id] $x $y] > > > } > > > pack [canvas .c -bg white] -fill both -expand 1 > > > doodle .c > > > bind .c <Double-3> {%W delete all} > > > > > > Anyone undertaking the exercise should post it back here for > > > others to see the translation. > > > > > > -- > > > Jeff Hobbs, The Tcl Guy > > > http://www.ActiveState.com/, a division of Sophos > > |
From: Jeff H. <je...@Ac...> - 2004-09-03 23:08:07
|
The following is a working translation of the Tcl doodle code. There are others ways to express some of this stuff, but this works: #!/usr/bin/perl use Tcl::Tk qw/:perlTk/; my $mw = MainWindow->new(); my $c = $mw->Canvas(-background => "white") ->pack(-fill => 'both', -expand => 1); our $id; doodle($c); MainLoop; sub doodle { my ($w, $color) = @_; my $color = "black" unless defined $color; Tcl::Tk::bind($w->interp, $w, '<1>', [\&doodle_start, Tcl::Ev('%x', '%y'), $w, $color]); Tcl::Tk::bind($w->interp, $w, '<B1-Motion>', [\&doodle_move, Tcl::Ev('%x', '%y'), $w]); # bind $w <1> [list doodle'start %W %x %y $color] # bind $w <B1-Motion> {doodle'move %W %x %y} } sub doodle_start { my ($x, $y, $w, $color) = @_; $id = $w->create('line', $x, $y, $x, $y, -fill => $color); # set ::_id [$w create line $x $y $x $y -fill $color] } sub doodle_move { my ($x, $y, $w) = @_; my @coords = $w->coords($id); unshift @coords, $x, $y; $w->coords($id, @coords); # $w coords $::_id [concat [$w coords $::_id] $x $y] } Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos > -----Original Message----- > From: Paul Falbe [mailto:fa...@ca...] > Sent: Thursday, September 02, 2004 8:52 AM > To: Jeff Hobbs > Cc: tcl...@li... > Subject: Re: [tcltk-perl] Package Img > > > > here is my simplistic attach at bind to canvas. I Can't get it to > for for "<1>". > > #!/usr/bin/perl > > use Tcl::Tk qw/:perlTk/; > my $MW = MainWindow->new(); > my $C = $MW->Canvas(-height => '100', > -width => '100' )->pack(-fill => 'both'); > my $f = $C->Frame->pack; > my $c =$f->Canvas(-width => '100', > -height => '100', > -highlightthickness => 0, > -background => "#ffffff")->pack; > $c->bind('canvas', '<1>', \&foo); > > MainLoop; > > sub foo { > print "foo\n"; > } > > On Thu, Sep 02, 2004 at 08:20:14AM -0700, Jeff Hobbs wrote: > > Paul Falbe wrote: > > > > >Would you happen to have a example of a scribble program > using perl Tcl/TK? > > > > Not in Perl Tcl::Tk, but this is so simple the translation should > > be easy: > > > > From http://wiki.tcl.tk/9625 > > > > proc doodle {w {color black}} { > > bind $w <1> [list doodle'start %W %x %y $color] > > bind $w <B1-Motion> {doodle'move %W %x %y} > > } > > proc doodle'start {w x y color} { > > set ::_id [$w create line $x $y $x $y -fill $color] > > } > > proc doodle'move {w x y} { > > $w coords $::_id [concat [$w coords $::_id] $x $y] > > } > > pack [canvas .c -bg white] -fill both -expand 1 > > doodle .c > > bind .c <Double-3> {%W delete all} > > > > Anyone undertaking the exercise should post it back here for > > others to see the translation. > > > > -- > > Jeff Hobbs, The Tcl Guy > > http://www.ActiveState.com/, a division of Sophos > |
From: Paul F. <fa...@ca...> - 2004-09-02 15:52:43
|
here is my simplistic attach at bind to canvas. I Can't get it to for for "<1>". #!/usr/bin/perl use Tcl::Tk qw/:perlTk/; my $MW = MainWindow->new(); my $C = $MW->Canvas(-height => '100', -width => '100' )->pack(-fill => 'both'); my $f = $C->Frame->pack; my $c =$f->Canvas(-width => '100', -height => '100', -highlightthickness => 0, -background => "#ffffff")->pack; $c->bind('canvas', '<1>', \&foo); MainLoop; sub foo { print "foo\n"; } On Thu, Sep 02, 2004 at 08:20:14AM -0700, Jeff Hobbs wrote: > Paul Falbe wrote: > > >Would you happen to have a example of a scribble program using perl Tcl/TK? > > Not in Perl Tcl::Tk, but this is so simple the translation should > be easy: > > From http://wiki.tcl.tk/9625 > > proc doodle {w {color black}} { > bind $w <1> [list doodle'start %W %x %y $color] > bind $w <B1-Motion> {doodle'move %W %x %y} > } > proc doodle'start {w x y color} { > set ::_id [$w create line $x $y $x $y -fill $color] > } > proc doodle'move {w x y} { > $w coords $::_id [concat [$w coords $::_id] $x $y] > } > pack [canvas .c -bg white] -fill both -expand 1 > doodle .c > bind .c <Double-3> {%W delete all} > > Anyone undertaking the exercise should post it back here for > others to see the translation. > > -- > Jeff Hobbs, The Tcl Guy > http://www.ActiveState.com/, a division of Sophos |
From: Jeff H. <je...@Ac...> - 2004-09-02 15:15:44
|
Paul Falbe wrote: > Would you happen to have a example of a scribble program using perl Tcl/TK? Not in Perl Tcl::Tk, but this is so simple the translation should be easy: From http://wiki.tcl.tk/9625 proc doodle {w {color black}} { bind $w <1> [list doodle'start %W %x %y $color] bind $w <B1-Motion> {doodle'move %W %x %y} } proc doodle'start {w x y color} { set ::_id [$w create line $x $y $x $y -fill $color] } proc doodle'move {w x y} { $w coords $::_id [concat [$w coords $::_id] $x $y] } pack [canvas .c -bg white] -fill both -expand 1 doodle .c bind .c <Double-3> {%W delete all} Anyone undertaking the exercise should post it back here for others to see the translation. -- Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos |
From: Vadim K. <va...@ar...> - 2004-08-31 19:46:03
|
Paul Falbe wrote: >I am trying to do the following: > >$c->CanvasBind("<ButtonPress-1>" => [\&set_point,$c,$p,Tcl::Ev('x'), Tcl::Ev('y')]); >$c->CanvasBind("<B1-Motion>" => [\&set_lined_point,$c,$p,Tcl::Ev('x'), Tcl::Ev('y')]); > >Program doesn't complain about syntax but my functions set_point and >set_lined_point never get called. Is this the proper way to bind >events? > > > No compatible and easy way, unfortunately. Please see at example .......\TclTk\tk-demos\widget_lib\floor.pl somewhere near $c->bind('<2>' => \\'xy', sub { my ($x,$y) = (shift,shift); my($c) = @_; #my $e = $c->XEvent; $c->scan('mark', $x, $y); }); |
From: Paul F. <fa...@ca...> - 2004-08-31 19:19:11
|
I am trying to do the following: $c->CanvasBind("<ButtonPress-1>" => [\&set_point,$c,$p,Tcl::Ev('x'), Tcl::Ev('y')]); $c->CanvasBind("<B1-Motion>" => [\&set_lined_point,$c,$p,Tcl::Ev('x'), Tcl::Ev('y')]); Program doesn't complain about syntax but my functions set_point and set_lined_point never get called. Is this the proper way to bind events? |
From: Vadim K. <va...@ar...> - 2004-08-31 19:02:07
|
> The Img package is a Tcl extension. See http://tkimg.sourceforge.net/. > I dislike and disagree that this should be required for the Photo > method. You will find the need_tk('Img') call there, but that's not > really accurate, especially for what you have above, which is creating > a blank photo. Img is a Tcl extension that adds numerous graphicals > image formats (about a dozen more, including JPEG and PNG). If you can > live with the standard GIF and P*M support, you will never need Img. > IMO this requirement should be moved to a higher level. > As far as I remember that "need_tk('Img')" was added by me, and I just didn't knew better way of doing things. I beleive we should require 'Img' only when it is really needed, for example at a moment when JPEG processing is required. I will try adding code for this. Best regards, Vadim. |
From: Paul F. <fa...@ca...> - 2004-08-31 15:32:03
|
On Tue, Aug 31, 2004 at 08:22:23AM -0700, Jeff Hobbs wrote: > Paul Falbe wrote: > > >I am now getting this error > > > >can't find package Img at /usr/lib/perl5/site_perl/5.8.3/Tcl/Tk.pm line > >704. > > > >I am trying to do the following > > > >$Photos{"Photo"} = $curfrm->Photo(-palette => 2, > > -width => $wdth, > > -height => $hght); > > The Img package is a Tcl extension. See http://tkimg.sourceforge.net/. > I dislike and disagree that this should be required for the Photo > method. You will find the need_tk('Img') call there, but that's not > really accurate, especially for what you have above, which is creating > a blank photo. Img is a Tcl extension that adds numerous graphicals > image formats (about a dozen more, including JPEG and PNG). If you can > live with the standard GIF and P*M support, you will never need Img. > IMO this requirement should be moved to a higher level. I could live with GIF but looks like like there is more to it than just commenting out that line. I guess I will install tkimg... |
From: Jeff H. <je...@Ac...> - 2004-08-31 15:22:31
|
Paul Falbe wrote: > I am now getting this error > > can't find package Img at /usr/lib/perl5/site_perl/5.8.3/Tcl/Tk.pm line 704. > > I am trying to do the following > > $Photos{"Photo"} = $curfrm->Photo(-palette => 2, > -width => $wdth, > -height => $hght); The Img package is a Tcl extension. See http://tkimg.sourceforge.net/. I dislike and disagree that this should be required for the Photo method. You will find the need_tk('Img') call there, but that's not really accurate, especially for what you have above, which is creating a blank photo. Img is a Tcl extension that adds numerous graphicals image formats (about a dozen more, including JPEG and PNG). If you can live with the standard GIF and P*M support, you will never need Img. IMO this requirement should be moved to a higher level. -- Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos |
From: Paul F. <fa...@ca...> - 2004-08-31 13:46:06
|
I am now getting this error can't find package Img at /usr/lib/perl5/site_perl/5.8.3/Tcl/Tk.pm line 704. I am trying to do the following $Photos{"Photo"} = $curfrm->Photo(-palette => 2, -width => $wdth, -height => $hght); Am package am I missing? After this I believe I will be close to having my app run under Tcl::Tk at least under a Linux i386 type machine. The next hurdle will be getting it to run under a wince PDA. |
From: Jeff H. <je...@Ac...> - 2004-08-30 17:36:53
|
Paul Falbe wrote: > On Mon, Aug 30, 2004 at 09:46:14AM -0700, Jeff Hobbs wrote: > > > What directory should BWidget-1.7.0.tar.gz be untared for > > > Tcl::Tk to find them? > > > > It should be a sibling directory to $tcl_library, or you > > must add its location into the Tcl auto_path variable before you > > 'package require' it. > > on my Casio I installed under > > \Storage Card\tcl844\lib\tcl8.4\Bwidget > if I > print $ENV{"TCL_LIBRARY"} > I get > \Storage Card\tcl844\lib\tcl8.4 FWIW, you should not need to have TCL_LIBRARY set if you have correctly installed Tcl on the machine (that is, with Tcl\bin and Tcl\lib properly structured). In any case, you want the BWidget directory as a "sibling", not a "subdirectory". That means: \Storage Card\tcl844\lib\Bwidget However, you might be getting an error because the dir structure isn't correct. A normal install of BWidgets has the version number and dirname like 'bwidget-1.7'. You can install ActiveTcl on your main Windows machine, then just copy the Tcl\lib\bwidget-1.7 directory as a sibling to the one on the CE machine. This should work. > I am getting some type of error but it is not going to my > \perl-stderr file. What code should be used to catch Tcl::Tk errors? I'm not sure how the celib interaction works in this case. I've had errors that mysteriously didn't go to the celib created std channel files. Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos |
From: Paul F. <fa...@ca...> - 2004-08-30 17:30:48
|
On Mon, Aug 30, 2004 at 09:46:14AM -0700, Jeff Hobbs wrote: > > What directory should BWidget-1.7.0.tar.gz be untared for > > Tcl::Tk to find them? > > It should be a sibling directory to $tcl_library, or you > must add its location into the Tcl auto_path variable before > you 'package require' it. on my Casio I installed under \Storage Card\tcl844\lib\tcl8.4\Bwidget if I print $ENV{"TCL_LIBRARY"} I get \Storage Card\tcl844\lib\tcl8.4 if I print print $ENV{"tcl_library"} I get \Storage Card\tcl844\lib\tcl8.4 I am getting some type of error but it is not going to my \perl-stderr file. What code should be used to catch Tcl::Tk errors? |
From: Jeff H. <je...@Ac...> - 2004-08-30 16:46:27
|
> What directory should BWidget-1.7.0.tar.gz be untared for > Tcl::Tk to find them? It should be a sibling directory to $tcl_library, or you must add its location into the Tcl auto_path variable before you 'package require' it. Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos |
From: Paul F. <fa...@ca...> - 2004-08-30 14:21:31
|
What directory should BWidget-1.7.0.tar.gz be untared for Tcl::Tk to find them? |
From: Paul F. <fa...@ca...> - 2004-08-30 13:53:04
|
On Fri, Aug 27, 2004 at 11:37:10AM -0700, Jeff Hobbs wrote: > > Now I am having problems with statements like this > > > > if (! Exists($Frames{"ListDealers"})) { > > Shouldn't that be Tcl::Tk::Exists for Tcl::Tk ? > This worked thanks! |
From: Jeff H. <je...@Ac...> - 2004-08-27 18:37:22
|
> Now I am having problems with statements like this > > if (! Exists($Frames{"ListDealers"})) { Shouldn't that be Tcl::Tk::Exists for Tcl::Tk ? Jeff |
From: Paul F. <fa...@ca...> - 2004-08-27 14:28:28
|
Adding sub lower to Tcl::Tk worked. Thanks. Now I am having problems with statements like this if (! Exists($Frames{"ListDealers"})) { $Frames{"ListDealers"} is a Frame > > Moving on I get errors on this type statement > > > > $PREVIOUS_FORM->lower; > > > > Where $PREVIOUS_FORM is a Frame created as so: > > I'll add "lower" method to Tcl::Tk widgets and will perlform release to CPAN > at this weekend (at least I very hope so), so this method will be there at > next CPAN release. > > Until that you could do once of following ways: > > - do > $interp->lower($PREVIOUS_FORM); # where $interp is your Tcl::Tk > interpreter > > - otherwise do > $PREVIOUS_FORM->interp->lower($PREVIOUS_FORM); # in case you do not have > interpreter object handy > > - or do another way: > edit Tcl/Tk.pm file and add subroutine > > sub lower { > my $self = shift; > $self->interp->call("lower",$self,@_); > $self; > } > > just after subroutine place (copy-paste and edit) : > sub place { > my $self = shift; > $self->interp->call("place",$self,@_); > $self; > } > > Somewhere at line 820, and your code will be working for > $PREVIOUS_FORM->lower; > > > In case you'll do third way, please tell us your additions, we'll include > many of them to next release. > > Best regards, > Vadim. |
From: Konovalov, V. <vko...@sp...> - 2004-08-27 06:11:34
|
> yes. From manpage > > $font = $widget->Font(-option=>value, ...>?) > $font = $widget->fontCreate(?fontname??, -option=>value, ...>?) > Creates a new font object and returns a reference > to it. fontname > specifies the name for the font; if it is omitted, > then Tk gener- > ates a new name of the form fontx, where x is an > integer. There > may be any number of option-value pairs, which > provide the desired > attributes for the new named font. See "FONT > OPTIONS" below for a > list of the possible attributes. Actually you should better refer to Tcl/Tk manpage rather that perlTk, and transform its explanations to Tcl::Tk. The reason is simple: it contains most up-to-date information for Tcl/Tk and, as long as Tcl::Tk is a bridge module for Tcl/Tk, you should look into Tcl/Tk for information. > Moving on I get errors on this type statement > > $PREVIOUS_FORM->lower; > > Where $PREVIOUS_FORM is a Frame created as so: I'll add "lower" method to Tcl::Tk widgets and will perlform release to CPAN at this weekend (at least I very hope so), so this method will be there at next CPAN release. Until that you could do once of following ways: - do $interp->lower($PREVIOUS_FORM); # where $interp is your Tcl::Tk interpreter - otherwise do $PREVIOUS_FORM->interp->lower($PREVIOUS_FORM); # in case you do not have interpreter object handy - or do another way: edit Tcl/Tk.pm file and add subroutine sub lower { my $self = shift; $self->interp->call("lower",$self,@_); $self; } just after subroutine place (copy-paste and edit) : sub place { my $self = shift; $self->interp->call("place",$self,@_); $self; } Somewhere at line 820, and your code will be working for $PREVIOUS_FORM->lower; In case you'll do third way, please tell us your additions, we'll include many of them to next release. Best regards, Vadim. |
From: Paul F. <fa...@ca...> - 2004-08-26 20:37:16
|
On Thu, Aug 26, 2004 at 01:21:18PM -0700, Jeff Hobbs wrote: > > [falbe@ca4ad iPaq]$ tautotran.pl > > Tcl error 'bad option "Font": must be cget or configure at > > /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/Tcl.p > > m line 417. ' while invoking scalar result call: > > ". Font -family Helvetica -size -24" at > > > from > > $largefont = $MW->Font(-family => 'Helvetica', -size => -24); > > Was this legal in Perl/Tk? It's a pretty odd corruption of > the original Tk stuff. You should just do: > > $font = Tcl::Tk::font('create', -family => "Helvetica", -size => -24); yes. From manpage $font = $widget->Font(-option=>value, ...>?) $font = $widget->fontCreate(?fontname??, -option=>value, ...>?) Creates a new font object and returns a reference to it. fontname specifies the name for the font; if it is omitted, then Tk gener- ates a new name of the form fontx, where x is an integer. There may be any number of option-value pairs, which provide the desired attributes for the new named font. See "FONT OPTIONS" below for a list of the possible attributes. > > or less preferred but works: > > $font = $mw->font("create", -family => "Helvetica", -size => -24); This works! > $font = $mw->fontCreate(-family => "Helvetica", -size => -24); Moving on I get errors on this type statement $PREVIOUS_FORM->lower; Where $PREVIOUS_FORM is a Frame created as so: my $newfrm = $Canvases{programs}->Frame(-height => 245); $newfrm->place(-x => 0, -y => 0, -relwidth => 1, -relheight => 1); |
From: Jeff H. <je...@Ac...> - 2004-08-26 20:21:32
|
> [falbe@ca4ad iPaq]$ tautotran.pl > Tcl error 'bad option "Font": must be cget or configure at > /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/Tcl.p > m line 417. ' while invoking scalar result call: > ". Font -family Helvetica -size -24" at > from > $largefont = $MW->Font(-family => 'Helvetica', -size => -24); Was this legal in Perl/Tk? It's a pretty odd corruption of the original Tk stuff. You should just do: $font = Tcl::Tk::font('create', -family => "Helvetica", -size => -24); or less preferred but works: $font = $mw->font("create", -family => "Helvetica", -size => -24); $font = $mw->fontCreate(-family => "Helvetica", -size => -24); at some point we will have to establish a formal guide to how you translate from Tcl/Tk style code to Perl/Tcl::Tk style code. We will want to support Perl/Tk, but really with a compat layer, as some of the decisions made there in syntax are odd and/or limiting. Jeff Hobbs, The Tcl Guy http://www.ActiveState.com/, a division of Sophos |
From: Paul F. <fa...@ca...> - 2004-08-26 20:10:18
|
I get this error: [falbe@ca4ad iPaq]$ tautotran.pl Tcl error 'bad option "Font": must be cget or configure at /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/Tcl.pm line 417. ' while invoking scalar result call: ". Font -family Helvetica -size -24" at /usr/lib/perl5/vendor_perl/5.8.3/i386-linux-thread-multi/Tcl.pm line 418 Tcl::call('Tcl::Tk=SCALAR(0x804cde0)',.,'Font','-family','Helvetica','-size',-24) called at /usr/lib/perl5/site_perl/5.8.3/Tcl/Tk.pm line 2034 Tcl::Tk::Widget::__ANON__('Tcl::Tk::Widget::MainWindow=SCALAR(0x80ea90c)','-family','Helvetica','-size',-24) called at /usr/lib/perl5/site_perl/5.8.3/Tcl/Tk.pm line 2040 Tcl::Tk::Widget::AUTOLOAD called at /usr/lib/perl5/site_perl/5.8.3/Tcl/Tk.pm line 2338 Tcl::Tk::Widget::MainWindow::AUTOLOAD('Tcl::Tk::Widget::MainWindow=SCALAR(0x80ea90c)','-family','Helvetica','-size',-24) called at ./tautotran.pl line 51 from $largefont = $MW->Font(-family => 'Helvetica', -size => -24); Any ideas? |
From: <aku...@sh...> - 2004-08-20 05:36:29
|
11'th Annual Tcl/Tk Conference October 11 - 15, 2004 New Orleans, Louisiana, USA Email Contact tc...@tc... We are pleased to announce the 11'th Annual Tcl/Tk conference (Tcl'2004), sponsored by Noumena Corporation, in cooperation with ActiveState and ExpoTech. Come to New Orleans to: * Learn about the power of Tcl/Tk. * Present exciting new work involving Tcl/Tk. * See the latest developments in Tcl/Tk. * Meet Tcl/Tk researchers and users from academia, government and industry. * Plan for future Tcl/Tk related developments. The conference program will include paper presentations, tutorials, Birds of a Feather (BOF) sessions and invited key-note talks. Registration Online registration is ready now. <http://www.tcl.tk/community/tcl2004/reg.html> Tutorials Come learn about Tcl from the experts. This year's Tcl/Tk Conference includes one of the best sets of Tutorials ever offered including tutorials on Jacl, TclHttpd, Starkit, Advanced GUI construction, and the API. <http://www.tcl.tk/community/tcl2004/tut2004.html> Schedule More details will be added to the schedule as they become available. <http://www.tcl.tk/community/tcl2004/schedule.html> Those attending the conference will be interested in the conference info page. <http://www.tcl.tk/community/tcl2004/info.html> To keep in touch with news regarding the conference and Tcl events in general, subscribe to the tcl-announce list. <http://listserv.activestate.com/mailman/mysubs?show=announce> Other Forms of Participation For those who are not presenting a paper at the conference, but would like to present their work in some form, we do provide several other forms of participation. Slots for Works-in-Progress (WIP) presentations and Birds-of-a-Feather sessions (BOFs) are available on a first-come, first-served basis by sending email to tc...@tc.... Some WIP and BOF time slots will be held open for on-site reservation, so we encourage all attendees with interesting work in progress to consider presenting that work at the conference. Conference Committee Gerald Lester HMS Software General Chair Andreas Kupries ActiveState Corp Clif Flynt Noumena Corp Website Admin Jeffrey Hobbs ActiveState Corp Kevin Kenny GE Global Research Center Ken Jones Avia Training Mac Cody Raytheon Company Kim Richerts Steve Landers Digital Smarties Sheila Miguez Motorola Larry Virden Tcl FAQ Maintainer Contact Information tc...@tc... |
From: Konovalov, V. <vko...@sp...> - 2004-08-12 07:45:45
|
Thank you, I'll try making CPAN release within 1-2 weeks and will include your changes. Best regards, Vadim. > -----Original Message----- > From: Daniel A. Steffen [mailto:st...@ic...] > Sent: Wednesday, August 11, 2004 7:12 PM > To: tcl...@li... > Subject: [tcltk-perl] Patch to build tcl-perl against Tcl.framework on > Mac OS X > > > All, > > attached a patch to get the Tcl perl module to build against > Tcl.framework on Mac OS X (with --tclconfig > /Library/Frameworks/Tcl.framework/tclConfig.sh), both with > and without > stubs. > > Tcl::Tk will have to wait until [package require Tk] works with > TkAqua... > > Cheers, > > Daniel > > -- > ** Daniel A. Steffen ** "And now for something completely > ** Dept. of Mathematics ** different" Monty Python > ** Macquarie University ** <mailto:st...@ma...> > ** NSW 2109 Australia ** <http://www.maths.mq.edu.au/~steffen/> > > > Index: Makefile.PL > =================================================================== > RCS file: /cvsroot/tcltkce/Tcl/Makefile.PL,v > retrieving revision 1.9 > diff -u -p -r1.9 Makefile.PL > --- Makefile.PL 8 May 2004 02:11:12 -0000 1.9 > +++ Makefile.PL 11 Aug 2004 14:43:24 -0000 > @@ -16,6 +16,7 @@ my $usestubs; > my $libpath; > my $incpath; > my $wince; > +my @extraargs; > > GetOptions("tclsh=s", \$tclsh, > "tclconfig=s", \$tclconfig, > @@ -80,10 +81,17 @@ if ($tclconfig) { > if ($^O eq 'MSWin32') { > $defs .= " > -DLIB_RUNTIME_DIR=\\\"$tclcfg{'TCL_EXEC_PREFIX'}/bin\\\""; > $defs .= " -DTCL_LIB_FILE=\\\"$tclcfg{'TCL_DLL_FILE'}\\\""; > + } elsif ($^O eq 'darwin' && $tclcfg{'TCL_STUB_LIB_PATH'} =~ > /\.framework/ ) { > + (my $fmk = $tclcfg{'TCL_STUB_LIB_PATH'}) =~ > s/(?<=\.framework).*//; > + $defs .= " -DLIB_RUNTIME_DIR=\\\"$fmk\\\""; > + $defs .= " -DTCL_LIB_FILE=\\\"$tclcfg{'TCL_LIB_FILE'}\\\""; > } else { > $defs .= " > -DLIB_RUNTIME_DIR=\\\"$tclcfg{'TCL_EXEC_PREFIX'}/lib\\\""; > $defs .= " -DTCL_LIB_FILE=\\\"$tclcfg{'TCL_LIB_FILE'}\\\""; > } > + } elsif ($^O eq 'darwin' && $libpath =~ /-framework/ ) { > + @extraargs = (dynamic_lib => {OTHERLDFLAGS => $libpath}); > + $libpath = ""; > } > } else { > open(TCLSH, "$tclsh tclcfg.tcl |") or die "error > starting tclsh: > $!\n"; > @@ -138,6 +146,7 @@ WriteMakefile( > LIBS => ["$libpath"], > INC => "$incpath", > DEFINE => $defs, > + @extraargs, > ); > > #EOS > > > > ------------------------------------------------------- > SF.Net email is sponsored by Shop4tech.com-Lowest price on Blank Media > 100pk Sonic DVD-R 4x for only $29 -100pk Sonic DVD+R for only $33 > Save 50% off Retail on Ink & Toner - Free Shipping and Free Gift. > http://www.shop4tech.com/z/Inkjet_Cartridges/9_108_r285 > _______________________________________________ > Tcltk-perl mailing list > Tcl...@li... > https://lists.sourceforge.net/lists/listinfo/tcltk-perl > |