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-29 11:56:17
Mathias Röllig wrote:

> Hello Mathias!
> 
>>> Do Until oForm.isLoaded
>>>  Wait( 100 )
>>> Loop
>>
>> This has the drawback that it is "busy
waiting", costs CPU time and can
>> create reentrance problems. But in case there's no
listener that allows
>> to wait in passive state (don't know that, sorry)
it's indeed the only
>> chance.
> 
> I can add a LoadListener. But i don't know how to use
it. :-(
> 
> The listener can execute a separate sub, but this sub
doesn't know the
> variables of my sub.

Sorry, "too much subs" error. 

So you know how to add a listener and how to implement it,
right? But
your problem is that this listener and so any procedures it
might call
don't know variables of ... what exactly?

Ciao,
Mathias

-- 
Mathias Bauer (mba) - Project Lead OpenOffice.org Writer
OpenOffice.org Engineering at Sun: http://blogs.sun.com/Gu
llFOSS
Please don't reply to "nospamformbagmx.de".
I use it for the OOo lists and only rarely read other mails
sent to it.

------------------------------------------------------------
---------
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-31 11:48:17
Am 29.05.2007 18:56 schrieb Mathias Bauer:
>>>> Do Until oForm.isLoaded
>>>>  Wait( 100 )
>>>> Loop
>>>
>>> This has the drawback that it is "busy
waiting", costs CPU time and can
>>> create reentrance problems. But in case there's
no listener that allows
>>> to wait in passive state (don't know that,
sorry) it's indeed the only
>>> chance.
>>
>> I can add a LoadListener. But i don't know how to
use it. :-(
>>
>> The listener can execute a separate sub, but this
sub doesn't know the
>> variables of my sub.
>
> Sorry, "too much subs" error. 
>
> So you know how to add a listener and how to implement
it, right? But
> your problem is that this listener and so any
procedures it might call
> don't know variables of ... what exactly?

The problem is, that in my opinion i don't need a listener -
if i have
already understood the sense of it. A listener should
execute anything
if a special event is initiated. And this should be every
time the event
is applied.

By my macro should only wait once, if the form is not
loaded.

<do anything>
If oForm.isLoaded
<do this>
Else
<waiting for oForm.isLoaded>
<do this>
End If

I can't see how i can implement the waiting with a
listener.
So i should add the listener, wait for the event, and after
the event i
must remove the listener. But ... #-|


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 )