I am trying to create and use a custom dialog.  Bottom line is I get a long
traceback when I call the dialog using the createForm method.  Why doesn't
this work?:

Open class designer.
>From the menu select File, New Class..., OK/CancelDialog.
Add a label, Caption = "Hello"
>From menu, select Save as class. This pops up the dialog "Do you want to
save, The contents of the form or Just the selection." The default is "Just
the selection" (seems opposite to me). I select Contents of the form.
This calls a Save As dialog. I save it as HelloDialog.cdxml.
Now I want to use the dialog.

I create a new form in the designer by selecting New Class, Form. I add a
panel and a button. In the button's onHit event, I have this code:

 dlg = dabo.ui.createForm("HelloDialog.cdxml")
 dlg.Show()
 dlg.Release()

I save this as a runnable app, "HelloMainForm.py", in the same directory as
the cdxml file.
When I run HelloMainForm.py and click the button, I get a long traceback
ending with:

  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.p9, in
Create
  return _windows_.Panel_Create(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "parent" failed at ..\..\src\
.cpp(572) in wxWindow::Create(): can't create wxWindow without parent

What am I doing wrong?

Steve

ps: Here is the entire traceback if needed:

Traceback (most recent call last):
  File
"C:\Python25\lib\site-packages\dabo-0.8.3-py2.5.egg\dabo\ui\uiwx\dControl
Mixin.py", line 26, in _onWxHit
  self.raiseEvent(dEvents.Hit, evt, *args, **kwargs)
  File
"C:\Python25\lib\site-packages\dabo-0.8.3-py2.5.egg\dabo\ui\uiwx\dPemMixi
n.py", line 915, in raiseEvent
  super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args,
**kwargs)
  File
"C:\Python25\lib\site-packages\dabo-0.8.3-py2.5.egg\dabo\lib\eventMixin.p
y", line 93, in raiseEvent
  bindingFunction(event)
  File "c:\docume~1\owner\locals~1\temp\tmp1fdd1x.py", line 96, in onHit
  dlg = dabo.ui.createForm("HelloDialog.cdxml")
  File
"C:\Python25\lib\site-packages\dabo-0.8.3-py2.5.egg\dabo\ui\uiwx\__init__
.py", line 1074, in createForm
  frm = cls(*args, **kwargs)
  File "c:\docume~1\owner\locals~1\temp\tmpbk05ga.py", line 9, in __init__
  super(dPanel_1577888459, self).__init__(parent=parent,
attProperties=attProp
erties, *args, **kwargs)
  File
"C:\Python25\lib\site-packages\dabo-0.8.3-py2.5.egg\dabo\ui\uiwx\dPanel.p
y", line 184, in __init__
  attProperties=attProperties, *args, **kwargs)
  File
"C:\Python25\lib\site-packages\dabo-0.8.3-py2.5.egg\dabo\ui\uiwx\dPanel.p
y", line 163, in __init__
  properties=properties, attProperties=attProperties, *args, **kwargs)
  File
"C:\Python25\lib\site-packages\dabo-0.8.3-py2.5.egg\dabo\ui\uiwx\dPanel.p
y", line 33, in __init__
  properties=properties, attProperties=attProperties, *args, **kwargs)
  File
"C:\Python25\lib\site-packages\dabo-0.8.3-py2.5.egg\dabo\ui\uiwx\dPemMixi
n.py", line 166, in __init__
  pre.Create(*args, **kwargs)
  File "C:\Python25\lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py",
line 7
9, in Create
  return _windows_.Panel_Create(*args, **kwargs)
wx._core.PyAssertionError: C++ assertion "parent" failed at
..\..\src\msw\window
.cpp(572) in wxWindow::Create(): can't create wxWindow without parent


--- 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]

Reply via email to