dabo Commit
Revision 6319
Date: 2011-01-15 10:44:11 -0800 (Sat, 15 Jan 2011)
Author: Ed
Trac: http://trac.dabodev.com/changeset/6319

Changed:
U   trunk/ide/wizards/QuickLayoutWizard.py

Log:
Fixed an issue reported by Sibylle Koczian in which running the wizard for 
adding controls from the data environment would throw a "String must be present 
in the choices" error.


Diff:
Modified: trunk/ide/wizards/QuickLayoutWizard.py
===================================================================
--- trunk/ide/wizards/QuickLayoutWizard.py      2011-01-14 23:40:46 UTC (rev 
6318)
+++ trunk/ide/wizards/QuickLayoutWizard.py      2011-01-15 18:44:11 UTC (rev 
6319)
@@ -60,13 +60,20 @@
 
        def onLeavePage(self, dir):
                # This will return False if the connection cannot be made.
+               if not self.Wizard.ConnectionName:
+                       dabo.ui.stop(_("You must select a connection before 
proceeding."))
+                       return False
                return self.Wizard.makeConnection()
 
 
        def populateConnNames(self):
                dd = self.ddNames
-               dd.Choices = self.Application.getConnectionNames()
-               dd.PositionValue = 0
+               dd.DataField = ""
+               connNames = self.Application.getConnectionNames()
+               dd.Choices = connNames
+               if connNames:
+                       dabo.ui.setAfter(dd, "PositionValue", 0)
+               dabo.ui.setAfter(dd, "DataField", "ConnectionName")
                dd.refresh()
 
 



_______________________________________________
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