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

[Xotcl] knowing who is called "next"

From: Catherine Letondal <letondal_at_pasteur.fr>
Date: Thu, 18 Jan 2001 20:42:18 +0100

Hi,

Most of the time, I know what is going to be called when I peut a next
statement :
        - the class instproc method if from a proc
        - the mixin method if any
        - the superclass method
etc..

My question is the following: I have sometimes the instproc redefined at the
instance level with a proc: this is to enable the user to experiment a method on a given
object without breaking all the application (this is actually one the main
reason for me to use Xotcl). It's also a debug feature for more experimented developpers.

However, I have the "next" problem in such case: it's the instproc level which is called
instead of either the mixin or superclass method.

Is there any way either:
        - to ask by introspection who is going to be called - e.g something like:
                [[self] info next methodname]
        - to enforce it:
                classname next

I know the procsearch command, but it doesn't take a "next" argument!? I have tried :
        puts "procsearch: [[self] procsearch next]"
which gives this output:
procsearch: ::buttondata0::next
(buttondata0 is an instance for which a proc has been defined)
::buttondata0 proc

I don't see any solutions with 'info called/calling' features either?

Many thanks!

-- 
Catherine Letondal -- Pasteur Institute Computing Center