Hi Franck,
I think callBack cannot be reliably used with Basic because you cannot know when
the message list will be read. It can happen anywhere, as in this example:
Option Explicit
Private truc As Long
Sub Main
Dim ac As Object, oCallback As Object
Dim n As Long
truc = 0
ac = CreateUnoService("com.sun.star.awt.AsyncCallback")
oCallback = CreateUnoListener( "callback_", "com.sun.star.awt.XCallback" )
ac.addCallback( oCallback, 0)
for n = 1 to 10000
truc = n
next
End Sub
Sub callback_notify()
MsgBox(truc)
End Sub
At each run you will display a different value of variable truc.
Using a wait(10) will force the message list to be read, but it may already have
been read some instructions before...
Regards
Bernard
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]