ObjectA calling ObjectB

Midas MidasOneTwo at hotmail.nospam.com
Sat Dec 27 19:23:14 EST 2003


Thanks for assisting.

What I'm trying to do is as follows:

Part 1)  Create 10 new assorted objects
Part 2)  Link up the objects, somehow, so they can communicate with each other directly, like parts of an electrical circuit.
Part 3)  Call the first object, which calls another, etc. like an electrical circuit.

To change the circuit, I would only change part 2 and perhaps part 3.

For example, ObjectX could have an input, for a string, and two outputs.
If the input is "TurnOnS", it calls ObjectY.Input3
If the input is "TurnOnT", it calls ObjectZ.Input7

ObjectX would call either, ObjectY.Input3 or ObjectZ.Input7, because it was connected that way in part 2.

I could then later change part 2 so ObjectX called either ObjectE.Input2 or ObjectF.Input9
In other words, I could "re-wire" the circuit without changing anything in the objects.




More information about the Python-list mailing list