From: PeterAndBrian <pe...@pe...> - 2001-09-04 17:50:18
|
Yes, I agree we need to maintain the ability to edit and test in IDLE for now, since PythonCard IDE does not exist yet. Yet, it's so NICE to have scripts bound to objects. Perhaps we could have both. If we added an ID property to all objects, we could adopt a naming convention that used the ID in all handlers that "belong to" that object. For instance, we might make a rule that object-specific handlers include a pattern like "_[0-9]+_". Then, the function "on_123_mouseDown()" could be recognized as belonging to the object who's ID is 123. And, if all _123_ handlers were clustered together in an appropriately (and automatically) commented section of the code, they would be reasonable for conventional IDLE coders to work with. To support object copy and paste between stacks, we could pack up all the handlers into a .script property, just while traveling. Then, on paste, they could be integrated into the destination stack. The IDs might need to be adjusted at some point. If you copy and paste an object into the same stack (or another stack where that ID exists) the pasted object will need a new ID, and handlers tagged by ID would need to be adjusted. But that's doable. It all comes back to the lovely simplicity HyperCard provided. One stack = one file = one application = one window. OK, the one window part sucked, but you see where I'm going. What do you think about merging all dependant files in a single .py file, making PythonCard stacks fully self contained? Is this feasible or desirable? It would not be too hard to merge the Resourse file into the main module. But what about icons, graphics, sounds - the binary payload HyperCard stacks used to carry? It might never be efficient to do this in a text based format (base-64 encoding anyone?). That leads us to a binary format - a whole stack as one big pickled object? That doesn't sound so great either. What do you guys think? Peter |