At 01:44 PM 09/15/00 +0200, you wrote:
>Hello list,
>
>I don't manage to create similar things in vtcl. For instance, when I use
>"current" or "canvasx" in a function, I get things like "Toplevel unknown
>function".
>Isn't there, by any chance, someone who translated those examples to a vtcl
>project? (Or has similar projects that could serve a demo?) I think it would
>not only help me in learning, but probably a lot of other people too...
>

I haven't found there to be any difference between using tcl/tk code alone
or with vtcl. About 90% of my errors of the sort you mention are because
tcl does not require you to declare variables and assumes local scope
if you don't explicity specify. So, my advice is to check if your variables
need to be "global". Just because there is global statements at the top
of the program (from vtcl) this does not make them global inside any proc's
you create. You must "global" them there too.

Note that the latest (1.21) version off vtcl automatically creates new
procedures 
with a "global widget" because that is almost certainly needed as global. In
the prior version, I would forget this 50% of the time and get an error.

eric

_______________________________________________
vtcl-user mailing list
[EMAIL PROTECTED]
http://lists.sourceforge.net/mailman/listinfo/vtcl-user

Reply via email to