<div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Putting in:<br>
s1 push a<br>
results in an error, however I can do:<br>
</blockquote></div>
what is the error? this indicates that you have not defined the method push correctly<br><br>I get:<br> invalid command name "s1"<br>for:<br>s1 push 1<br>I get the same for:<br>xotcl::s1 push 1<br><br><div class="gmail_quote">
On Thu, May 8, 2008 at 2:27 AM, Gustaf Neumann <<a href="mailto:neumann@wu-wien.ac.at">neumann@wu-wien.ac.at</a>> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Matthew Smith schrieb:<div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Thank you, Gustaf. Makes sense.<br>
<br>
Is there anyway to call a method besides doing a "puts".<br>
</blockquote></div>
sure.<div class="Ih2E3d"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
Putting in:<br>
s1 push a<br>
results in an error, however I can do:<br>
</blockquote></div>
what is the error? this indicates that you have not defined the method push correctly.<div class="Ih2E3d"><br>
<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
puts [s1 pop]<br>
<br>
I would think that there would be a way to call a method without outputiing. Is there one?<br>
</blockquote></div>
sure:<br>
<br>
set a [s1 pop]<br>
<br>
The method pop returns a value. The question is, what do you want to do<br>
in your application with the value. Technically, "s1" is a Tcl command<br>
(which happens to be an XOTcl object) that returns a value. By placing<br>
the tcl command between square braces, you will be performing<br>
"command substitution", which means "replace the command with<br>
the result of the command" during evaluation. Same mechanism as<br>
<br>
set x [expr {1+2}]<br>
<br>
or<br>
<br>
puts [expr {1+2}]<br>
<br>
hope this helps<br><font color="#888888">
<br>
-gustaf neumann<br>
<br>
</font></blockquote></div><br>