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

[Xotcl] Re: [Xotcl] knowing who is called "next"

From: Gustaf Neumann <Gustaf.Neumann_at_wu-wien.ac.at>
Date: Fri, 19 Jan 2001 21:41:03 +0100 (CET)

>>>>> "CL" == Catherine Letondal <letondal_at_pasteur.fr> writes:

CL> Hi,

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

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

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

 Dear Catherine,

 why not letting the user to define mixin for the experimentation?
 you can still define other mixins/instmixins/etc. for your "own"
 purposes.
  
 what you seem to want is to change the onion shells of the next path

      filters mixins instmixins proc instprocs

 to something else, preferably starting with proc. note, that the
 onion shells are not atomic (with the exception of proc), but can
 be quite complicated (e.g. registering multiple cascaded filters),
 so simply "jumping" to a certain method of a certain Class won't let
 you to call there the "appropriate" method via next. changing or
 altering the order on the fly can lead to programs that are very hard
 to comprehend.

 We could implement a [[self] info next] or better a [self next] for
 introspection purposes (somewhat a generalization of "info
 calledproc"), but i am afraid, that this won't help you.

 best regards
-gustaf

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

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

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

CL> Many thanks!

CL> --
CL> Catherine Letondal -- Pasteur Institute Computing Center

CL> _______________________________________________
CL> Xotcl mailing list - Xotcl_at_wi.wu-wien.ac.at
CL> http://wi.wu-wien.ac.at/mailman/listinfo/xotcl