RE: [tcltk-perl] Re: Re[2]: Fwd: Re: Tcl and Tcl::Tk
Brought to you by:
hobbs
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 |