Strange bugs found when opening forms.

View: New views
1 Messages — Rating Filter:   Alert me  

Strange bugs found when opening forms.

by Dennis Meulensteen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,

I have a form with a memo field which is opened by double clicking on another
memo field in a parent form. This form's memo field should then be loaded by
the text in the parent form's memo field. After the child form is closed it
should update the parent's memo field.

No matter what I try, with one exception, I can't load the child form's memo
field with any text. The exception is if I first open a messagebox from the
child form?!? Is this strange or what?

Here is the parent object's call:
res = memo.getForm().openForm('frmZoombox')

This is the child form's On Opened function:

def eventFunc (form) :
    parentForm = form.findOpenForm('Contact')
    if parentForm == None : RekallMain.messageBox("Contact form not
opened!?!")
    else :
        #RekallMain.messageBox(parentForm.getGlobalCtrl('notitie').value)
        #time.sleep(1)
        #dummy = parentForm.getGlobalCtrl('notitie').value
        form.update()
        form.txtZoomTxt.value = parentForm.getGlobalCtrl('notitie').value
        #form.update()


If I uncomment the messagebox, it works, the child field is opened. This also
works (even without the messagebox) if I switch the design form to edit mode
and back again.

I also tried the standard method using parameters but that hit the same bug
and proved to be a dead end. That is why this code is not as generic as I'd
like it to be...

The first line of the child form's on Opened event is also a work-around
because getOpener() fails!

this is from the manual:
object getOpener ( )
Get opening form
Return: object: Opening form
If the form was opened by another form (ie., by a call to openForm or one of
the related method), then this method returns the form-level object in that
form. If opened directly from the list of forms, or from a macro, then the
result is None.

This appears to work just the other way around!!! IE returns a form when
opened from the designer, but None when called by openForm(...)!?

Needless to say this has me stumped...

I'm on rekall 2.4.5. openSuse 103 (x-86-64) installed from RPMs.

I'd appreciate any help on this,
Thanks,
Dennis

_______________________________________________
Rekall-devel mailing list
Rekall-devel@...
http://www.mailman.a-i-s.co.uk/cgi-bin/mailman/listinfo/rekall-devel