wxPython should ensure that there is a single wxApp instance. lbc creates dialogs (either modal or modeless) with the wxDialog class, but not the wxFrame class. I have not built an app with wxFrame as yet, so you may be exploring new territory to some extent. Besides looking at the fruit basket example, look at the routines in lbc.py. You might also check out the source code of McTwit, which uses lbc
Thanks, Jamal On 5/30/2010 11:59 PM, Alex Hall wrote:
Yes, I think I see most of it; I am not experienced enough in wx to get it all, but I think I have the most important parts. I have my wx frame created, and am opening dialogs using lbc on top of my frame. I am suddenly getting strange problems with my frame not closing with alt-f4, sometimes, and needing to hit ctrl-c in the shell from where I opened my program to kill the process completely, even when alt-f4 does work. I am telling my dialog "parent=board.parentFrame", where board.parentFrame is the frame I am using, but nothing improves. Are the two instances of wx.App not getting along? If so, what should I do to get lbc dialogs to play nice with my own wx frame, which is already there and set up with controls and an accelerator table? On 5/30/10, Jamal Mazrui<empower@xxxxxxxxx> wrote:Please look closely at the lbc_fruit.py example. It shows how to get the value of an edit box and listbox. It also shows how to complete a dialog with the ShowModal method. Jamal On 5/30/2010 8:17 PM, Alex Hall wrote:Hello all, I am starting to use pyLbc. It looks perfect for what I am doing, but I have two rather large problems: first, my dialog is not showing my controls, and second, I cannot figure out how to get values from it once it does show up. Here is my code, called from inside a function: dlg=lbc.Dialog(title="Launch Harpoon missile") dlg.AddListBox(label="Select impact pattern:", names="cross pattern|x pattern", values=0|1) dlg.AddTextCtrl(label="Center coordinates for missile strike:", value=nav.getCoords(board.x,board.y)) lbc.DialogShow(dlg) All I get is a dialog with title "ShowDialog" and an OK button; no listbox, no input box. Once I get this working, how do I retrieve the value of the input box and the value of the selected item in my listbox to give to the function that created the dialog? TIA!
__________View the list's information and change your settings at http://www.freelists.org/list/programmingblind