message hierarchy question

Mark Wieder mwieder at ahsoftware.net
Fri Jan 6 02:19:49 EST 2006


Dick-

Thursday, January 5, 2006, 4:23:17 PM, you wrote:

> With this technique, you can overload any handler without repeatedly
> removing and inserting scripts into front or back.  I think.  I see you're
> satisfied with your current approach, but do you see a problem with this
> technique?

For my current conundrum, yes. I need not just polymorphism here, but
I also have the case where functions in the library stack need to call
a function in the mainstack. So there are (at least) three stacks
involved: a mainstack, a second stack loaded from disk on the fly
which needs to go in front of the mainstack objects, and a library
substack of the mainstack. In order to maintain object separation (the
library substack doesn't know or care about fields in the mainstack,
data logging file particulars, etc) I now have the mainstack and
substack as peer library stacks ("start using") and the stack that
gets loaded from disk as a frontstack ("insert into"). The stack
loaded on the fly needs, of course, to call functions in both the
mainstack and substack; functions in the substack need to use the
overloaded functions in the frontstack; and both need functions in the
substack.

If I were just dealing with overloading functions then your approach
of value() or send would work, and that's what I was doing before life
got complicated.

-- 
-Mark Wieder
 mwieder at ahsoftware.net




More information about the use-livecode mailing list