From: Peter C. <pe...@pe...> - 2001-09-04 04:17:00
|
One thing I loved about HyperCard was the nice clean script encapsulation it provided. The samples seem to have all the code in one module - while that's often the best design, it's not as physically intuitive. Each HyperCard object had a script property, making an ideal place to store handlers applicable to that object, even if the objects name changed or it was copied to another stack. That was always more satisfying to me than the all-in-one approach that Visual Basic takes to handlers, where one change to the object name breaks every link. I wonder how hard it would be to implement script encapsulation in PythonCard. Perhaps an object script could be stored as a dictionary of functions keyed by function name? Then the script could be a property of an object, in true HyperCard sense. Of course, that implies a built in script editor to manage the scripts - perhaps a subset of IDLE. Sigh - I can see it all gets rather complicated. Peter |