Re: brand new to tcl; newbie question



On Apr 29, 10:45 pm, chedderslam <chedders...@xxxxxxxxx> wrote:
ok, I'll try to do a little better in phrasing my questions.

If the proc is named test, such as below:
---------------------------------------------------------------
proc test {} {
 return "text to display"}

proc content {} {
 set somevar [test]
 return "$somevar"}

---------------------------------------------------------------
I get:

invalid command name "test"
    while executing
"test"
    (procedure "content" line 3)
    ::19493::payload->content
    invoked from within
"[self]::payload content"
(snipped)

If I change the name of the proc to something else, like this:
---------------------------------------------------------------
proc myproc {} {
 return "text to display"

}

proc content {} {
 set somevar [myproc]

 return "$somevar"

}

--------------------------------------------------------------
I get this:
::19493::payload

I hope I am being more clear.

What you see is an effect coming from outside the Tcl core; I'd guess
from the XOtcl object system which is layered above. I'd suggest
starting by learning vanilla Tcl before touching something that
exotic ;-)

-Alex
.



Relevant Pages