Hi Derrell,

Am 26.01.2007 um 20:18 schrieb [EMAIL PROTECTED]:

>>     case 2:                     // async with event listeners
>>       // Dispatch the event to our listeners.
>>       if (! ex) {
>>         eventTarget.createDispatchDataEvent(eventType, result);
>>
>> What gets passed as event data is the method result (e.g. a  
>> string),  not the
>> whole structure (result, id, etc.).
>
> It's a naming problem.  What we get coming in is called "result"  
> and it
> contains both an "id" and "result".  In the "completed" event of  
> the request,
> I hadn't noticed the line that does result = result["result"] which  
> is just
> plain nasty as far as maintainability goes (as is evidenced by the  
> fact that I
> missed it when adding the asyncListener feature).

You're right, and I'm probably to blame for that :-(  (But I do  
wonder how you missed it when using the feature ;-))

> So yes, we should be providing the id as well as the string  
> result.  We need
> to replicate the original:  result = { result: result, id: id } and  
> pass that.
>
> It's unlikely that anything other than SWAT is using that yet.   
> It's too bad
> this just got released, as the change will not be backward  
> compatible...
>
> I think that fixing the first problem (naming) will allow an easy  
> fix to the
> second problem (missing data being sent to final listener).  What  
> do you think
> of this (untested) patch:
[snip]

Looks good to me (not tested however).

Regards,

   Andreas


-------------------------------------------------------------------------
Take Surveys. Earn Cash. Influence the Future of IT
Join SourceForge.net's Techsay panel and you'll get the chance to share your
opinions on IT & business topics through brief surveys - and earn cash
http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to