Paul McNett wrote:
> Uwe Grauer wrote:
>> Which event is best to use if a Form gets called (shown)?
>> Is it onActivate or is there something better?
>> I asking to find a better place to initialize my called form with the
>> parameters which got set from  the parentform.
> 
> onActivate will get called whenever the form (re)takes the focus. So if 
> you use that you should set a flag so that you don't call the same init 
> code over and over again.
>

I do this now, with a flag.

> You can also try overriding afterInit() or afterInitAll(), which are 
> hook methods that get called rather late in the init cycle.
> 

Overriding?
I thought that afterInit[All] is called after the createForm.

This is called to show a childform:
def callEditEtyp(self, newrec=False):
        frmclass = "EditEtyp.cdxml"
        frm = dabo.ui.createForm(frmclass)
        frm.parentform = self
        if newrec:
                frm.newrec = True
                frm.etypiid = None
        else:
                frm.newrec = False
                currow = self.dGridEtyp.CurrentRow
                curiid = self.PrimaryBizobj.getDataSet(rowStart=currow, 
rows=1)[0]['iid']
                frm.etypiid = curiid
        self.hide()
        frm.showModal()

May i ask some more on how to do it when i come back from my childform?

Uwe

_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/dabo-dev

Reply via email to