Skip to main content


Eclipse Community Forums
Forum Search:

Search      Help    Register    Login    Home
Home » Eclipse Projects » Dynamic Languages Toolkit (DLTK) » Tcl wrong error marking(Tcl wrong error mark: "Extra characters after close-brace")
icon4.gif  Tcl wrong error marking [message #847927] Tue, 17 April 2012 19:50 Go to next message
Rostislav Pleshivtsev is currently offline Rostislav PleshivtsevFriend
Messages: 2
Registered: April 2012
Junior Member
Hi guys.
Some moths ago I started to use DLTK for my Tcl work projects, and all works fine until i use tcl script evaluation.
When i write a code like this:
grid $variablename {*}$arguments

The $arguments variable gets marked as an sintax error. But it's not such an error int Tcl. It's a part of Tcl specification:

www.tcl.tk/man/tcl8.5/TclCmd/eval.htm
Note that in the most common case (where the script fragment is actually just a list of words forming a command prefix), it is better to use {*}$script when doing this sort of invocation pattern. It is less general than the eval command, and hence easier to make robust in practice. The following procedure acts in a way that is analogous to the lappend command, except it inserts the argument values at the start of the list in the variable:


So, is there a way to add an exception to marking rules? Because it's quite anoying some times having an error you know it isn't.
Hope I explained well my problem.

Ros.

[Updated on: Fri, 20 April 2012 14:30]

Report message to a moderator

Re: Wrong error marking [message #847960 is a reply to message #847927] Tue, 17 April 2012 20:40 Go to previous message
Rostislav Pleshivtsev is currently offline Rostislav PleshivtsevFriend
Messages: 2
Registered: April 2012
Junior Member
Hi again.
I realized that this error can be avoided by writing the code otherwise:
set comvar "grid $variablename $arguments"
eval $comvar

This is similar to but not as elegant as:
grid $variablename {*}$arguments
Cool

Ros.
Previous Topic:Noob: run/rspec mismatch?
Next Topic:Migrating from 2.0 to 3.0 or 4.0
Goto Forum:
  


Current Time: Thu Apr 18 04:23:12 GMT 2024

Powered by FUDForum. Page generated in 0.02207 seconds
.:: Contact :: Home ::.

Powered by: FUDforum 3.0.2.
Copyright ©2001-2010 FUDforum Bulletin Board Software

Back to the top