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

Uwe Zdun uwe.zdun@uni-essen.de
Mon, 14 May 2001 17:28:03 +0200


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

-- 
Uwe Zdun
Specification of Software Systems, University of Essen
Phone: +49 201 81 00 332, Fax: +49 201 81 00 398
zdun@{xotcl.org,computer.org}, uwe.zdun@uni-essen.de