Hi Derrell,

thanks for the quick answer.

On Tue, 23 Feb 2010, Derrell Lipman wrote:

> On Tue, Feb 23, 2010 at 09:58, Fritz Zaucker <[email protected]>wrote:
>
>> Hi,
>>
>> I am trying to send an rpc async call from within a drop event handler.
>>
>> The drop event handler works just fine (using debug console messages to
>> verify) as long as I don't make an rpc call. With the rpc call I get
>>
>> Too much recursion:
>>
>>        return qx.Bootstrap.getClass(value) == "Function"; Bootstrap.js
>> (line 609)
>>
>> Even deferring the async call with qx.event.Timer doesn't work.
>>
>> Is this to be expected? If not, I'll try to get a small example together.
>
>
> The possible issue I see is that when you're in an event handler, when you
> return from that handler, the event (and all of its data) goes away. If
> you're trying to do something that involves the need for that event to
> stick around, that could cause problems.

I am doing the following (appreviated):

this.__data = [];
this.navTree.addListener("drop", function(e) {
     this.__data = e.getTarget().someMethodOnMyWidget(); // returning an array
     rpc.callAsyn(callBack, 'remote method', this.__data);
}

So, I guess, if anything, this.__data could be empty, but nevertheless I
don't quite see why it should get into an endless loop ...

Looking with the debugger it seems that it recurses (is this the right
verb?) in a check for callBack (?) being of type function.

> In principle, though, what you're trying should be possible. We do RPC
> calls from button "execute" event handlers all the time, so I'd expect it
> to work with drop events as well.

So do I and exactly the same rpc call works just fine from a changeSelection
handler on the very same tree I am using the drop handler on ...

I'll try some more things ...

Cheers,
Fritz

-- 
Oetiker+Partner AG              tel: +41 62 775 9903 (direct)
Fritz Zaucker                        +41 62 775 9900 (switch board)
Aarweg 15                            +41 79 675 0630 (mobile)
CH-4600 Olten                   fax: +41 62 775 9905
Schweiz                         web: www.oetiker.ch

------------------------------------------------------------------------------
Download Intel&#174; Parallel Studio Eval
Try the new software tools for yourself. Speed compiling, find bugs
proactively, and fine-tune applications for parallel performance.
See why Intel Parallel Studio got high marks during beta.
http://p.sf.net/sfu/intel-sw-dev
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to