Hallo
For XotclIDE I have built a Error Stack browser witch can parse error messages (in errorInfo) a convert it to methods list.
I have following problem. Consider the example
Class TestA TestA instproc fooA {} { [self] fooC } TestA instproc fooB {} { fooC } TestA instproc fooC {} { error {error from fooC} }
TestA a a fooA
generate following errorInfo error from fooC while executing "error {error hier}" (procedure "fooC" line 2) ::sample0 ::TestA->fooC invoked from within "[self] fooC" (procedure "fooA" line 2) ::sample0 ::TestA->fooA invoked from within
a fooB # generate following message
error from fooC while executing "error {error hier}" (procedure "fooC" line 2) invoked from within "fooC" (procedure "fooB" line 2) ::sample0 ::TestA->fooB invoked from within
I the first example we have the lines (procedure "fooC" line 2) ::sample0 ::TestA->fooC This can be good used for parsing errorInfo I the second there are only (procedure "fooC" line 2) The same bahavior is by method chains with "next" or filter methods.
Can the xotcl be changed for same dubug infos?
Artur Trzewik
Hi,
from 0.9 on we will execute in the calling namespace instead of the object namespace. The "downside" is that you cannot do
TestA instproc fooB {} { fooC }
anymore because you do not execute in TestA's namespace. The benefits are:
- you don't have to write :: to access global commands (e.g. if you want to ::set something in an instproc of ::Object). - you can "compose" commands, like X instproc myli c { [em [li $c]] p } - Thus, if you always have to use self, the problem below disappears. Without this we would not be able to provide the same debug infos because we have no control over the tcl command dispatch mechanism
However, the second problem you mention (with [[self] next]) is still there. We have discussed this and think that we should forbid [self] next as well, so that next calls are never dispatched as method calls. This seems to be a cleaner language design (since [self] next is rather for backwards compatibility and as we are approaching version 1.0 we should better get rid of it).
--uwe
On Saturday 06 October 2001 02:24 pm, you wrote:
Hallo
For XotclIDE I have built a Error Stack browser witch can parse error messages (in errorInfo) a convert it to methods list.
I have following problem. Consider the example
Class TestA TestA instproc fooA {} { [self] fooC } TestA instproc fooB {} { fooC } TestA instproc fooC {} { error {error from fooC} }
TestA a a fooA
generate following errorInfo error from fooC while executing "error {error hier}" (procedure "fooC" line 2)
::sample0 ::TestA->fooC invoked from within
"[self] fooC" (procedure "fooA" line 2)
::sample0 ::TestA->fooA invoked from within
a fooB # generate following message
error from fooC while executing "error {error hier}" (procedure "fooC" line 2) invoked from within "fooC" (procedure "fooB" line 2)
::sample0 ::TestA->fooB invoked from within
I the first example we have the lines (procedure "fooC" line 2)
::sample0 ::TestA->fooC
This can be good used for parsing errorInfo I the second there are only (procedure "fooC" line 2) The same bahavior is by method chains with "next" or filter methods.
Can the xotcl be changed for same dubug infos?
Artur Trzewik _______________________________________________ Xotcl mailing list - Xotcl@alice.wu-wien.ac.at http://alice.wu-wien.ac.at/mailman/listinfo/xotcl