In theory you should be able to wrap the dataset and the response handler
inside a single class, then you create a instance of that class inside your
other class pass in the end location and overide the known ondata event
something like
<class name="aclass">
<atttribute name="dsource" type="string">
<dataset name="dl" src="${parent.dsource}" ondata="parent.gotData(this)"/>
<method name="gotData"/>
</class>
<class ="bclass">
<aclass dsource="http://blah"><method name="gotData">Your
code</method></aclass>
</class>
In theory you could even throw in the datapointer to.. Hope this is clearer
then mud...
I thought of this after I had done 2 or 3 of them myself, but never really
tried it, hope it works for you...
Good luck with your g.ho.st'ing
z
On 2/6/07, Zvi Schreiber <[EMAIL PROTECTED]> wrote:
Our application makes lots of http calls. It is getting quite tiresome
to keep breaking up methods into one method which makes the call and another
method triggered ondata to process the results – especially when one logical
method needs to make several http calls.
Is there any way in OpenLaszlo to 'sleep' within a method while waiting
for a result? Or is there any way to wait for an event within the
procedural script?
Zvi