No registered users in community xowiki
in last 10 minutes
in last 10 minutes
[Fwd: Re: [Xotcl] Debugging in Expect with XOTCL]
From: Gustaf Neumann <neumann_at_wu-wien.ac.at>
Date: Sat, 24 Jun 2006 15:59:56 +0200
-------- Original-Nachricht --------
Betreff: Re: [Xotcl] Debugging in Expect with XOTCL
Datum: Sat, 24 Jun 2006 15:59:11 +0200
Von: Gustaf Neumann <neumann_at_wu-wien.ac.at>
An: Jegan Kumar Somi Ramasamy Subramanian -X (jsomiram - HCL at Cisco)
<jsomiram_at_cisco.com>
Referenzen:
<AAC329F11B438F43BBA91F50013A69B6013FA62F_at_xmb-blr-413.apac.cisco.com>
Dear Jegan,
i know close to nothing about how expect works and what procs it
defines. but maybe i can point you to
the right direction, and someone else can help you more specific.
Jegan Kumar Somi Ramasamy Subramanian -X (jsomiram - HCL at Cisco) schrieb:
> Hi all,
>
> I have few questions in debugging of XoTcl with expect/tclsh.
>
> 1) How can we do debugging from expect? I am not able to use edprocs
> in xoTcl. I usually do "edprocs <proc name>" from expect and I will do
> necessary changes without changing the actual file. Do we have any
> such option in xoTcl?
i am pretty sure, edproc is defined in exect in tcl. i would recommend
to define methods
Object instproc edproc ...
Class instproc edinstproc ...
where you get the methods arguments and body in the same way as in
edproc via introspection and
redefined the proc/instproc after editing.
>
> 2) Also, is there any direct way to print or get the variables defined
> in a class in expect? As of now, I am creating a simple procedure in
> the expect under the required class and I am retrieving the values
> using that procedure by calling them with the corresponding object.
similar as (1). in plain tcl , you have ...[info vars]..., in xotcl you
have ...[obj info vars]...It should be possible
with little work to provide a generic xotcl layer for this as well.
>
> 3) In case of TCL, while doing debugging we do some changes in the
> .tcl file and we just source it in the expect prompt to get the
> changes. But in case of xoTcl, I am now coming out of expect and again
> opening a new one and giving a "package require <package name>" to get
> the updated information. Is there any simple way to do this as I need
> to reset many of my environment while doing this process?
i don't understand the problem here, esp. with the "package reqire" and
"environment variables". if you have a running
script, and you have xotcl already loaded, there is no need to do e.g. a
package require again before sourcing the script.
We do this all the time e.g. in the openacs environment (openacs.org).
-gustaf
>
>
> Thanks,
> Jegan.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xotcl mailing list
> Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
>
Date: Sat, 24 Jun 2006 15:59:56 +0200
-------- Original-Nachricht --------
Betreff: Re: [Xotcl] Debugging in Expect with XOTCL
Datum: Sat, 24 Jun 2006 15:59:11 +0200
Von: Gustaf Neumann <neumann_at_wu-wien.ac.at>
An: Jegan Kumar Somi Ramasamy Subramanian -X (jsomiram - HCL at Cisco)
<jsomiram_at_cisco.com>
Referenzen:
<AAC329F11B438F43BBA91F50013A69B6013FA62F_at_xmb-blr-413.apac.cisco.com>
Dear Jegan,
i know close to nothing about how expect works and what procs it
defines. but maybe i can point you to
the right direction, and someone else can help you more specific.
Jegan Kumar Somi Ramasamy Subramanian -X (jsomiram - HCL at Cisco) schrieb:
> Hi all,
>
> I have few questions in debugging of XoTcl with expect/tclsh.
>
> 1) How can we do debugging from expect? I am not able to use edprocs
> in xoTcl. I usually do "edprocs <proc name>" from expect and I will do
> necessary changes without changing the actual file. Do we have any
> such option in xoTcl?
i am pretty sure, edproc is defined in exect in tcl. i would recommend
to define methods
Object instproc edproc ...
Class instproc edinstproc ...
where you get the methods arguments and body in the same way as in
edproc via introspection and
redefined the proc/instproc after editing.
>
> 2) Also, is there any direct way to print or get the variables defined
> in a class in expect? As of now, I am creating a simple procedure in
> the expect under the required class and I am retrieving the values
> using that procedure by calling them with the corresponding object.
similar as (1). in plain tcl , you have ...[info vars]..., in xotcl you
have ...[obj info vars]...It should be possible
with little work to provide a generic xotcl layer for this as well.
>
> 3) In case of TCL, while doing debugging we do some changes in the
> .tcl file and we just source it in the expect prompt to get the
> changes. But in case of xoTcl, I am now coming out of expect and again
> opening a new one and giving a "package require <package name>" to get
> the updated information. Is there any simple way to do this as I need
> to reset many of my environment while doing this process?
i don't understand the problem here, esp. with the "package reqire" and
"environment variables". if you have a running
script, and you have xotcl already loaded, there is no need to do e.g. a
package require again before sourcing the script.
We do this all the time e.g. in the openacs environment (openacs.org).
-gustaf
>
>
> Thanks,
> Jegan.
> ------------------------------------------------------------------------
>
> _______________________________________________
> Xotcl mailing list
> Xotcl_at_alice.wu-wien.ac.at
> http://alice.wu-wien.ac.at/mailman/listinfo/xotcl
>