On 10/17/10 5:22 PM, Ed Leafe wrote:
> dabo Commit
> Revision 6114
> Date: 2010-10-17 17:22:34 -0700 (Sun, 17 Oct 2010)
> Author: Ed
> Trac: http://trac.dabodev.com/changeset/6114
>
> Changed:
> U   trunk/ide/wizards/AppWizard/spec-main.py.txt
>
> Log:
> Jacek's patch for simplifying the code in spec-main.py.txt.
>
>
>
> Diff:
> Modified: trunk/ide/wizards/AppWizard/spec-main.py.txt
> ===================================================================
> --- trunk/ide/wizards/AppWizard/spec-main.py.txt      2010-10-18 00:22:05 UTC 
> (rev 6113)
> +++ trunk/ide/wizards/AppWizard/spec-main.py.txt      2010-10-18 00:22:34 UTC 
> (rev 6114)
> @@ -40,19 +40,8 @@
>   # generator, but you can change that here. Additionally, if form names were
>   # passed on the command line, they will be opened instead of the default one
>   # as long as they exist.
> -ui = app.ui
> -default_form = ui.Frm%(tableName)s
> -formsToOpen = []
> -form_names = [class_name[3:] for class_name in dir(ui) if class_name[:3] == 
> "Frm"]
> -for arg in sys.argv[1:]:
> -  arg = arg.lower()
> -  for form_name in form_names:
> -    if arg == form_name.lower():
> -      formsToOpen.append(getattr(ui, %(formOpenString)s))
> -if not formsToOpen:
> -  formsToOpen.append(default_form)
> -for frm in formsToOpen:
> -  frm(app.MainForm).show()
> +app.default_form = ui.Frm%(tableName)s
> +app.startupForms()
>
>   # Start the application event loop:
>   app.start()

Ok. The intent of the verbose code was in the spirit of showing people how to 
be in 
control of which form or forms to open, but okay.

Paul

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev
Searchable Archives: http://leafe.com/archives/search/dabo-dev
This message: http://leafe.com/archives/byMID/[email protected]

Reply via email to