Hi,
I have a filter on Object which purpose is to register the called procs of every class in my application, for debugging purpose. The list of called procs is then displayed in a graphical component where it can be selected to be traced (http://www-alt.pasteur.fr/~letondal/biok/Images/tracegui.gif).
I would like to have also mixin procs registered, but apparently, the calledclass in the filter, when called on the mixin, does not return the mixin class, but the actual called class. Is there a way to know that the mixin proc was called - in the filter scope I mean ?
This filter is put on every class during a given period: Object instproc spyFilter args { set proc [self calledproc] set class [self calledclass]
# debug is an Object doing debugging tasks and registering # trace/debug informations
debug instvar calledprocs lappend calledprocs($class) $proc }
Class UpdateMixin UpdateMixin instproc update args { ... }
UpdateMixin filter actually displays spyFilter, but the filter does not "see" the UpdateMixin as the calledclass, but rather the class the mixin is associated with.
Thanks for your help,
-- Catherine Letondal -- Pasteur Institute Computing Center
Catherine Letondal wrote:
Hi,
I have a filter on Object which purpose is to register the called procs of every class in my application, for debugging purpose. The list of called procs is then displayed in a graphical component where it can be selected to be traced (http://www-alt.pasteur.fr/~letondal/biok/Images/tracegui.gif).
I would like to have also mixin procs registered, but apparently, the calledclass in the filter, when called on the mixin, does not return the mixin class, but the actual called class. Is there a way to know that the mixin proc was called - in the filter scope I mean ?
This filter is put on every class during a given period: Object instproc spyFilter args { set proc [self calledproc] set class [self calledclass]
# debug is an Object doing debugging tasks and registering # trace/debug informations debug instvar calledprocs lappend calledprocs($class) $proc
}
I should maybe add that this is not the complete filter procedure code (there is of course a next statement and other bookkeeping statements).
Class UpdateMixin UpdateMixin instproc update args { ... }
UpdateMixin filter actually displays spyFilter, but the filter does not "see" the UpdateMixin as the calledclass, but rather the class the mixin is associated with.
Thanks for your help,
-- Catherine Letondal -- Pasteur Institute Computing Center
Xotcl mailing list - Xotcl@wi.wu-wien.ac.at http://wi.wu-wien.ac.at/mailman/listinfo/xotcl
-- Catherine Letondal -- Pasteur Institute Computing Center
Hi,
at the moment there is no introspection support to find the "next" applied mixin ... However, the new "self next" should return something like:
XOTclClasses::UpdateMixin::update
in the filter. Unfortunately it overlooks mixins after a filter at the moment ... which is rather a bug. I'll fix it ASAP so that it'll work at least in the coming (patch) release.
"calledclass" should not return the mixins because otherwise mixins are not transparent for the client.
you can, of course, check for mixins with "info mixin" on [self]. And check with "info instproc" for the calledproc
--Uwe
On Saturday 12 May 2001 09:48, you wrote:
Hi,
I have a filter on Object which purpose is to register the called procs of every class in my application, for debugging purpose. The list of called procs is then displayed in a graphical component where it can be selected to be traced (http://www-alt.pasteur.fr/~letondal/biok/Images/tracegui.gif).
I would like to have also mixin procs registered, but apparently, the calledclass in the filter, when called on the mixin, does not return the mixin class, but the actual called class. Is there a way to know that the mixin proc was called - in the filter scope I mean ?
This filter is put on every class during a given period: Object instproc spyFilter args { set proc [self calledproc] set class [self calledclass]
# debug is an Object doing debugging tasks and registering # trace/debug informations debug instvar calledprocs lappend calledprocs($class) $proc
}
Class UpdateMixin UpdateMixin instproc update args { .... }
UpdateMixin filter actually displays spyFilter, but the filter does not "see" the UpdateMixin as the calledclass, but rather the class the mixin is associated with.
Thanks for your help,
-- Catherine Letondal -- Pasteur Institute Computing Center
Xotcl mailing list - Xotcl@wi.wu-wien.ac.at http://wi.wu-wien.ac.at/mailman/listinfo/xotcl