List Info

Thread: Re: Waiting for a document load and for a form load




Re: Waiting for a document load and for a form load
user name
2007-05-16 05:03:17
Hi Mathias,

>>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. 

(noticed that when I saw you explained the usage of
BoundField to
somebody else in another list - too late for my previous
post 

> 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.

That's surprising. It sounds as if there is some
asynchronous
notification involved (e.g. the controls would be notified
asynchronous
that the loaded is complete, then fill themselves with the
new content,
while you Basic macro continues running), but to my best
knowledge, this
shouldn't be the case at all.

If you have a small self-contained sample document which
shows this
behaviour, I'd be interested in having a look at it.

> I dont't know if there is a event like
"moveOfRowIsComplete" that the
> macro can waiting for.

asking for the IsLoaded property is nearly the best you can
do - setting
this property to TRUE is the last thing, done immediately
before
notifying the load listeners, but after everything else.

Ciao
Frank


-- 
- Frank Schönheit, Software Engineer        
frank.schoenheitsun.com -
- Sun Microsystems                      http://www.sun.com/star
office -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- - - - - -

------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


Re: Waiting for a document load and for a form load
user name
2007-05-16 08:07:46
Hi Frank!

Am 16.05.2007 12:03 schrieb Frank Schönheit - Sun
Microsystems Germany:
>> oForm.moveToInsertRow()
>> oControl = oForm.getByName( "mySubform"
).getByName( "myControl" )
>> Wait( 3000 )
>> oControl.setString( "myString" )

>> 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.

I meant that there is no effect, because the subform is
loaded and the
loop is not executed. I've tested it with
 oForm.getByName( "mySubform" ).reload()
 i = 0
 Do Until oForm.getByName( "mySubform"
).isLoaded()
 i = i + 1
 Loop
 print i
and get i = 0 as result.


> If you have a small self-contained sample document
which shows this
> behaviour, I'd be interested in having a look at it.

You have mail. 
The sample shows also that the problem not depends to the
datasource
connection.


Have a nice man day! (Or is there another english synonym?)

Greetings
	Mathias
-- 
·-· cut here
·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·-·->8·-·


------------------------------------------------------------
---------
To unsubscribe, e-mail: dev-unsubscribeapi.openoffice.org
For additional commands, e-mail: dev-helpapi.openoffice.org


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )