set a "-geometry 20x20 -relief sunken"
listbox .q $a
However, I can't seem to find the correct syntax.
Anyone out there know how to do something like that?
Tim Jackson
tjac...@bnr.ca fiz...@ibm.net
--
Disclaimer: My views in no way reflect the views of my employer or
anyone else for that matter.
In the above example $a appears as one parameter to listbox.
Use of eval will cause another level of parsing which will deal with this i.e.
eval listbox .q $a
|>
|> However, I can't seem to find the correct syntax.
|>
|> Anyone out there know how to do something like that?
|>
|> Tim Jackson
|> tjac...@bnr.ca fiz...@ibm.net
|> --
|> Disclaimer: My views in no way reflect the views of my employer or
|> anyone else for that matter.
Cheers, John
--
-----------------------------------------------------------------------------
| John Talintyre |
| Speech Technology Unit j...@saltfarm.bt.co.uk |
| BT Labs |
-----------------------------------------------------------------------------
Yes, but there's an hidden danger with this.
Suppose a is {-title "range [0-9]"} (I use accolades because of
brackets), then :
eval listbox .q $a
will be first parsed and become :
eval listbox -title "range [0-9]"
The "eval" executes and read successively "listbox", "-title", and
eventually "range [0-9]". But there are brackets ! Eval will see the
brackets, and try to execute them... And you'll get something like :
unknown command "0-9"...
So be careful with evals, don't feed them with unexpected special
characters !
Martin.
: set a "-geometry 20x20 -relief sunken"
: listbox .q $a
how about:
eval listbox .q $a
Hein