Menu

#1 Reversed-Order Method Dispatch does not work (always)

open
nobody
None
5
2005-04-25
2005-04-25
Jens Engel
No

VERSION: 0.4

The reversed-order method dispatch mechanism does
not work for more complex container configurations,
especially when a container is part of another one.

EXAMPLE:
container:A := ( container:B, container:C )
container:B := ( B1 )
container:C := ( C1, C2)

ASSUMPTION: Verbose start/stop methods in all
components.

>>> A = PyContainer()
>>> B = PyContainer(config="B.xml", parent=A)
>>> C = PyContainer(config="C.xml", parent=A)
>>> A.start():
B1.start called.
C1.start called.
C2.start called.

# EXPECT: The following sequence order
>>> A.stop():
C2.stop called.
C1.stop called.
B1.stop called.

# CURRENT: OOPS, not completely reversed sequence.
>>> A.stop():
C1.stop called.
C2.stop called.
B1.stop called.

Discussion


Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.