Hi Mathias!

Thanks for your quick response!

oDoc = StarDesktop.loadComponentFromURL( myDoc, "_blank", 0, props() )
'***(1)*** waiting for document load
oForm = oDoc.DrawPage.Forms.getByName( "myForm" )
oForm.moveToInsertRow()
oControl = oForm..getByName( "mySubForm" ).getByName( "myControl" )
'***(2)*** waiting for form load
oControl.setString( "myString" )

>> At (1) the macro must wait till the document is loaded if it isn't so.
>> Otherwise i get a exception.
>>
>> At (2) the macro must wait till the form is fully loaded. Otherwise the
>> "myString" is deleted because the control default.
>>
>> So my questions:
>> (1) How can i test that the document ist loaded and the form is available?
>
> As long as the document isn't an HTML document the loading process is
> complete already when loadComponentFromURL returns.

It is a writer document with a database form on it.
The database form is connected to a database. So it is possible that the
makro not need to wait for the document but that the database connection
is established(?).


>> (2) How can i test that the form is fully loaded?
> No idea, sorry. What does that mean?

Sorry, i forgot the command oForm.moveToInsertRow(). :-(
It seems so, that the database form makes a refresh after that command.
But it seems also that it is fullfilled after oControl.setString(
"myString" ), so that the string is always deleted again.

If i go step by step through the makro, it does what i want. I thought i
can register a event at the document and/or at the form so that the
macro can wait for the special event - but i don't know how to do this. :-(


greetings
        Mathias t. o. ;-)
-- 
·-· cut here ·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·->8·-·

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to