From: Kevin A. <al...@se...> - 2001-08-30 03:15:08
|
The resourceEditor now saves files. I also hacked it up so that it gets pretty aggressive about not saving default values, but it might be overly aggressive and I still can't make it deal with 'size' correctly. So if you need a -1 or -2 value for any size attribute you're going to have to hand edit the .rsrc.py files. Remember when editing and saving to always work on a copy, no telling what bugs might be lurking, but it seems to work reasonably well. I copied the samples directory and then opened and saved every .rsrc.py and they all ran fine afterwards. There is a template.rsrc.py file that is loaded by default so even if you start the resourceEditor and just start adding widgets, it will save a valid .rsrc.py file. You can still preview the output with the View Attributes menu item. There is no editing of stack, menu, or background attributes, that is probably going to have to wait until we have some generalized dialog support. That means you still need to hand edit the .rsrc.py files to add/change menus and other crucial attributes. I haven't switched font formats yet, but the Property Editor now correctly displays the current font attribute for a widget and test_widgets.py allows you to set the font for all widgets. The font dialog now accepts a Font as an input parameter and if that is not equal to None, then that is the default font you start out with in the dialog. The FileDialog now accepts a number of extra parameters for saving... FILE_OPEN # This is an open dialog. FILE_SAVE # This is a save dialog. FILE_HIDE_READONLY # Hide read-only files. # For save dialog only: prompt for a confirmation if a file will be overwritten. FILE_OVERWRITE_PROMPT # For open dialog only: allows selecting multiple files. FILE_MULTIPLE # Change the current working directory to the directory where the file(s) chosen by the user are. FILE_CHANGE_DIR All old samples work without change, but if you look at the new Save As... in the resourceEditor you'll see the new options at work. Due to the reliance of what is in cvs on the new PyCrust, I'm going to wait to do a release until Patrick puts out PyCrust 0.6. ka |