View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] Re: [Xotcl] calledclass in a filter: what if the calledclass is/has a mixin?

From: Catherine Letondal <letondal_at_pasteur.fr>
Date: Mon, 14 May 2001 11:06:17 +0200

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_at_wi.wu-wien.ac.at
> http://wi.wu-wien.ac.at/mailman/listinfo/xotcl

--
Catherine Letondal -- Pasteur Institute Computing Center