Hi Uwe,
    Did what you suggested (with some variations) - but I think I have gone 
wrong somewhere - do I need to create a variable ParentForm in my child form 
and update it from the passed value?


I put the following in my parent form :-

 def onHit_button8(self, evt):
  frm = MshipTypesForm(ParentForm=self)
  self.hide()
  frm.show()

and then in my child form put :-

 def beforeClose(self, evt):
  parent = self.ParentForm
  if parent != None:
   parent.show()

got the following trace :-

C:/Python25/pythonw.exe -u  "C:/LBProject/LBooksMainMenu.py"
Traceback (most recent call last):
  File "c:\svndabo\dabo\ui\uiwx\dControlMixin.py", line 27, in _onWxHit
    self.raiseEvent(dEvents.Hit, evt, *args, **kwargs)
  File "c:\svndabo\dabo\ui\uiwx\dPemMixin.py", line 944, in raiseEvent
    super(dPemMixin, self).raiseEvent(eventClass, nativeEvent, *args, 
**kwargs)
  File "c:\svndabo\dabo\lib\eventMixin.py", line 93, in raiseEvent
    bindingFunction(event)
  File "C:/LBProject/LBooksMainMenu.py", line 75, in onHit_button8
    frm = MshipTypesForm(ParentForm=self)
  File "c:\svndabo\dabo\ui\uiwx\dForm.py", line 873, in __init__
    BaseForm.__init__(self, preClass, parent, properties, attProperties, 
*args, **kwargs)
  File "c:\svndabo\dabo\ui\uiwx\dForm.py", line 44, in __init__
    fm.dFormMixin.__init__(self, preClass, parent, properties, 
attProperties, *args, **kwargs)
  File "c:\svndabo\dabo\ui\uiwx\dFormMixin.py", line 77, in __init__
    attProperties, *args, **kwargs)
  File "c:\svndabo\dabo\ui\uiwx\dPemMixin.py", line 169, in __init__
    pre.Create(*args, **kwargs)
  File "C:\Python25\Lib\site-packages\wx-2.8-msw-unicode\wx\_windows.py", 
line 506, in Create
    return _windows_.Frame_Create(*args, **kwargs)
TypeError: 'ParentForm' is an invalid keyword argument for this function

> Here is what i do:
>
> In the parent form:
>    def callEditForm(self, newrecmode):
>        frm = EditForm.EditForm(ParentForm=self, ...)
>        self.hide()
>        frm.show()
>
> In the child form:
>    def save(self, dataSource=None, closeafter=False):
>        self.save(dataSource=dataSource)
>        parent = self.ParentForm
>        if parent != None:
>            parent.show()
>        self.close()
>
> Now the parent gets hidden while showing the childform.
> The child is somhow modal to the parent.
>
> Uwe



_______________________________________________
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/877fbd28b75640dca4a3668467ba7...@roger

Reply via email to