Yan Guiborat wrote:
> 
>  I don't like that much race conditions, so I used a synchronous call to
> get columns names and ids, into the constructor. Like this, I'm sure the
> table is in a stable state when constructed.
> 

Yes, asynchronicity can create real headaches, but in my opinion, if you
solve it well, it creates a much better user experience than blocking the ui
during synchronous requests. What I do is use the callback functions to nest
the neccessary request commands in the right order. This way, all the
requests can dispatched simultaneously, and the execution flow will proceed
as request results come in. 


Yan Guiborat wrote:
> 
> I'm now using this->debug, have to loose some bad habits  ;-)
> 

I think most people here will counsel against the use of alert() in qooxdoo
apps because it really messes up event-driven logic. BTW, the dialog
contribution provides you with dialogs that work with callbacks rather than
blocking the execution thread when waiting for a user's interaction.


Yan Guiborat wrote:
> 
> I am JSON encoding my answer from backend, and I thought I had to use eval
> to convert it back to a JS understandable format...sic, I'll have to have
> a look at that :-)
> 

It depends what backend you're using. If you use one of the provided RPC
Servers such as RpcPhp or the qcl server, your RPC service method can simply
return whatever data structure you want and it will be converted into JSON
automatically. Similarly, if you use the qcl.data.store.Json data store,
you'll get the json conversion for free - the store will have a 'model'
property in the qx.core.Object format, and the callback function returns the
data plain javascript json data, i.e. object, array, or primitive.

HTH,
Christian
-- 
View this message in context: 
http://qooxdoo.678.n2.nabble.com/Remote-table-columns-from-backend-problem-tp5097604p5107786.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------

_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to