Hi Frank!
Am 16.05.2007 09:44 schrieb Frank Schönheit - Sun Microsystems Germany:
> moveToInsertRow resets the content of the controls in the form to their
> default value. So if you do a
> oForm.moveToInsertRow()
> oControl.setString( "myString" )
> then this should normally work.
>
> However, note that what you modify here is the control content, not the
> content of the form field which the control is bound to. (AFAIK, the dev
> guide should explain the difference).
Yes i know. ;-)
In this especially case i use this feature as is.
The control is located at a subform of oForm. So if oForm moves to
insert row, the control (and its subform) has nothing to show.
So i write a string into the control that should be displayed until the
record in oForm is saved (or any other action is performed that
refreshes oForm).
The problem is that
oForm.moveToInsertRow()
oControl = oForm.getByName( "mySubform" ).getByName( "myControl" )
Wait( 3000 )
oControl.setString( "myString" )
works. Yes, i design the forms with a slow database connection over the
internet ... So it can be, that there is no problem if you use a quick
(local) database connection.
I tried also
oForm.getByName( "mySubform" ).reload()
Do Until oForm.getByName( "mySubform" ).isLoaded()
Wait( 100 )
Loop
but the subform is loaded ... with the same effect.
Without the waiting time, the string is set and then deleted by the
fulfillment of the row moving. (Don't know, if this sentence is
understandable for english speakers ...)
I dont't know if there is a event like "moveOfRowIsComplete" that the
macro can waiting for.
> You'll notice then that the form is modified after you set the
> "myString" value. To get rid of this, do a subsequent
> oForm.IsModified = FALSE
Interesting. But it seems this don't help for this special problem.
Thank you.
Mathias
--
·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·->8·-·
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]