Newsgroups: comp.lang.perl,comp.lang.scheme,gnu.misc.discuss,comp.lang.tcl
Path: cantaloupe.srv.cs.cmu.edu!nntp.club.cc.cmu.edu!godot.cc.duq.edu!news.duke.edu!news-feed-1.peachnet.edu!emory!swrinde!howland.reston.ans.net!EU.net!uknet!comlab.ox.ac.uk!sable.ox.ac.uk!mbeattie
From: mbeattie@sable.ox.ac.uk (Malcolm Beattie)
Subject: Re: tkperl5 Bindings (Was: Why you should not use Tcl)
Message-ID: <1994Oct2.130641.5111@inca.comlab.ox.ac.uk>
Organization: Oxford University Computing Service, 13 Banbury Rd, Oxford, UK
References: <9409232314.AA29957@mole.gnu.ai.mit.edu> <36eshf$cno@aurns1.aur.alcatel.com> <36fh44$f38@csnews.cs.Colorado.EDU> <36fmvl$esk@drax.isi.edu>
Date: Sun, 2 Oct 94 13:06:41 BST
Lines: 36
Xref: glinda.oz.cs.cmu.edu comp.lang.perl:35399 comp.lang.scheme:10193 gnu.misc.discuss:18646 comp.lang.tcl:19791

In article <36fmvl$esk@drax.isi.edu>,
Craig Milo Rogers <rogers@drax.isi.edu> wrote:
>In article <36fh44$f38@csnews.cs.Colorado.EDU> tchrist@mox.perl.com (Tom Christiansen) writes:
>>:       $f = Frame::new($path);
>>:       $l = Label::new($f, "-text" => "A simple demo written in tkperl");
>...
>>This reduces our perl version to:
>>    $f = new Frame $path;
>>    $l = new Label $f, "-text" => "A simple demo written in tkperl";
>
>	By the way, would someone refresh my/our memory on why the tk
>perl5 binding didn't end up:
>
>    $l = new Label $f, text => "A simple demo written in tkperl";
>
>(without the leading "-", "text" could be bareworded, right?)

Firstly, because there is still some of the orginal Tk/Tcl code
in tkperl which processes "-foo" arguments itself (especially in
the canvas code and some other bits for which tkperl just wraps
standard Tk calls in a wrapper to avoid Tcl parsing). Secondly,
lower-case barewords are especially deprecated. The preferred way
around this (well, i think *I* prefer it anyway), is to do
    use TkEnglish;
(that's alpha5, you'll currently have to do "use Configsubs" instead).
Then you can do
    $l->configure(Text => "A simple demo");
or whatever.

--Malcolm


-- 
Malcolm Beattie <mbeattie@sable.ox.ac.uk> (note new address)
Oxford University Computing Services
"Widget. It's got a widget. A lovely widget. A widget it has got." --Jack Dee
