From: Kevin A. <al...@se...> - 2004-04-29 15:37:46
|
On Apr 29, 2004, at 2:20 AM, Geoff Canyon wrote: > 1. Start the Resource Editor > 2. Create a new project > 3. Lay out the interface for that project -- at this point no code > entry is possible and the project is dead. > 4. Save the project as a resource file. > 5. Open the project in PythonCard -- at this point the interface of > the project is modifiable, but not savable. > 6. Edit the code of the project -- which is one big long list of code. > 7. Run the project in some fashion > 8. Test the project. > 9. Rinse and repeat steps 5-8. > 10. When I'm ready, do something or other to build the application. On > Mac and Unix it will open the console window and I can't stop it. The way the resourceEditor File->New... dialog works now you are asked to save the new project (template) before you start editing. I need to update the walkthrough. If you just open an old project or copy the files of an old project as the basis for a new one you'll already have both a resource file and the associated code module. That means you can do File->Run at any time. Any pair of files can be copied to the resourceEditor templates directory and they will show up in the File->New... dialog. Since there is no editor integration in the resourceEditor yet, you need to use the codeEditor or the editor/IDE of your choice to edit the source code. I would like to make a more tightly coupled layout/source editor environment as well as support hooking up events via the Property Editor, but that is probably more of a version 1.1 goal, not something I'll have time to do before 1.0. This is an Open Source project, so more developers can join in and it will help make these things better, sooner. The codeEditorR.py module was a simple experiment I did that works just like the codeEditor, but it examines the associated resource file for a module and displays a popup menu on the top left of all of the components. When you select a component, the popup menu on the right displays all the event handler names that are valid for that type of component. Event handlers that are already defined have a + in front of the name and selecting that name from the menu will cause the editor to scroll down to the first line of the event handler. If you select an event name that doesn't have a + in front of it then a code stub will be inserted into the source at the current insertion point. The idea was to merge a slightly more sophisticated and better looking version of that into the resourceEditor. You can edit the source and resource files simultaneously and whenever you do a File->Run the file you're working on - source in codeEditor or resource in resourceEditor - will be automatically saved so you're testing the most recent version of your project. http://www.python.org/cgi-bin/moinmoin/PythonEditors When you run the program, from the resourceEditor, codeEditor, double-click on the file, or invoke it from the shell it is running standalone. At a minimum you will have a close box on the main frame, but depending on what template you used, you'll probably have a File->Exit menu item as well. If your application code has a syntax error before it gets into the main loop, Python will just print an exception to the console window and quit. Unless you ran the script from the console, or used the Run with Interpreter menu item in the codeEditor or resourceEditor you won't be able to see what the syntax error was. If for some reason there is a nasty event handler related bug associated with an on_close handler then it is possible you won't be able to quit the script normally and will have to kill it with the Task Manager in Windows or use "kill -9 pid" or some such under *nix. When you're done and ready to build a standalone, then you can use py2exe, McMillans installer, and BundleBuilder to package up the your source, and the needed modules from PythonCard, wxPython, and Python. ka |