From: Sells, F. <fr...@ad...> - 2005-04-19 12:13:56
|
I use it and I edit (infrequently) outside the resource editor. When that happens, I use the resource editor to load and save to get it in sync. I have a very slight preference toward a separate module/script run from the command line. It would facilitate making the tool more robust and making it easier for users to customize to meet their needs. -----Original Message----- From: Schollnick, Benjamin [mailto:Ben...@xe...] Sent: Tuesday, April 19, 2005 8:06 AM To: pyt...@li... Subject: RE: [Pythoncard-users] newbie, tool to print resource structure Importance: Low > > Very useful.... I would suggest that Kevin consider adding > it to the > > Resource editor and maybe even expanding on it.... > > > > Possibly noting any non-default values that have been > configured for > > the widgets... > The danger with this approach is that the printer friendly version > *could* get out of sync with the resource file. Especially if the > resource file is edited outside the resourceEditor. While that is a valid concern.... In my opinion the user is not suppose to edit the file outside of the ResourceEditor.... So it is a moot point. > I think the original suggestion is better, just a little routine, > something like; > > >>> resfile = open('<resource file name>') > >>> resource = eval(resfile.read()) > >>> for background in resource['application']['backgrounds']: > >>> for component in background['components']: > >>> print "%s: %s %s" % (component['name'], > component['type'], > component['position']) > > N.B. it should be a trivial exercise to turn this into a handy > documentation function and put it into a module. I'll leave that (and > any bug fixes) as an exercise for the reader. Then you are making an automated task into a manual task that has to be run after every change made on the file.... (i.e. Pydoc) If you are concerned about allowing the user to do a manual execution of this.... Then we could make a stub so that the user can run it.... But it should stay in the resourceeditor to make it automagically updated when edited in the resourceeditor. - Benjamin ------------------------------------------------------- This SF.Net email is sponsored by: New Crystal Reports XI. Version 11 adds new functionality designed to reduce time involved in creating, integrating, and deploying reporting solutions. Free runtime info, new features, or free trial, at: http://www.businessobjects.com/devxi/728 _______________________________________________ Pythoncard-users mailing list Pyt...@li... https://lists.sourceforge.net/lists/listinfo/pythoncard-users |