In a message dated 8/9/2009 3:30:35 P.M. Eastern Daylight Time, [email protected] writes:
On Aug 9, 2009, at 2:02 PM, [email protected] wrote: > dlg = MyFind(self) > TypeError: 'dDialog_23949' object is not callable This looks like 'MyFind' is not a class, but the dialog itself. The example I gave used 'MyDialogClass()', which meant to instantiate the dialog from the class. If you are using .cdxml-based classes, then the code would be: dlg = dabo.ui.createForm("MyDialog.cdxml", self) What I had was: MyFind = dabo.ui.createForm("findRun2.cdxml", self) dlg = MyFind(self) dlg.show() Why wouldn't that work? Anyway, I switched to the more direct "dlg = dabo.ui.createForm("findRun2.cdxml", self)" and now it's working better. > My guess is that the dialog isn't really alive anymore when I return > to the > calling code. So, my questions are: > how do I hide the dialog? > Which type of dialog should I be using in Class Designer? (I picked > the > "plain dialog") > Do all dialogs have this "Accepted" property (I don't see it listed > in > the API documentation for dDialog, but it is listed for "Preference > dialog") 'Accepted' is defined in the dOkCancelDialog class, and reflects whether they clicked 'OK' or 'Cancel. I switched to a simple dOKCancelDialog that has a label and a textbox for entering the search value. When I click my "find" button, the dialog appears. If I fill in something in the textbox and click OK, the dialog flashes and stays there. If I click OK again, it vanishes and the code back in the calling form executes with no probs. Same with cancel, the first click makes the dialog "wink" and the second click closes it, and code does not execute. So, only problem is it's taking two clicks to get the dialog to close. Also, I'd like the dialog to start up with the cursor in the textbox, so user can just start typing. Is there a way to set the focus to the textbox on startup? Thanks again for all the help! Jonathan Thanks, Jonathan **************A Good Credit Score is 700 or Above. See yours in just 2 easy steps! (http://pr.atwola.com/promoclk/100126575x1222846709x1201493018/aol?redir=http://www.freecreditreport.com/pm/default.aspx?sc=668072&hmpgID=115&bcd =JulystepsfooterNO115) --- StripMime Report -- processed MIME parts --- multipart/alternative text/plain (text body -- kept) text/html --- _______________________________________________ Post Messages to: [email protected] Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-users Searchable Archives: http://leafe.com/archives/search/dabo-users This message: http://leafe.com/archives/byMID/[email protected]
