arsousa wrote:
> 
> I just want to know the best way to do that. I know that no module is
> allowed access to other modules, so module have to publish "something"
> in sandbox, but then what should sandbox do?
> 
> sandbox X -> Core -> Sandbox Y
> or
> sandbox X  -> sandbox Y (public)
> 
> 

The Sandboxes do not know of each other, they only know the Core, that is
why they cannot communicate with each other. But you as a developer do not
even need to deal with what they do internally, all you need to know is that
you can reach any other module by publishing a message. 

The pubsub (publish-subscribe) model is, of course, geared towards
recurring, unpredictable events. If you need to address a specific module
and query a singular result from it (this is how I understand you), you're
right that this is not well supported yet. Basically, you would send a
message and pass a callback as part of the data, which is executed once the
target module is done computing the requested value.

Something like:

sandbox.publish("targetModuleName.computeMyResult",{ params: [1,2,3],
callback: function(result){
   doSomethingWithThe(result);
}});

and in the target module:

sandbox.subscribe("targetModuleName.computeMyResult",function(data){
  var result = computeSomethingWithThe(data.params);
  data.callback( result );
});

"targetModuleName.computeMyResult" is simply a string, a message name, and
could be anything.

Does this make sense to you?


--
View this message in context: 
http://qooxdoo.678.n2.nabble.com/qcl-access-demo-application-tp6295025p6349101.html
Sent from the qooxdoo mailing list archive at Nabble.com.

------------------------------------------------------------------------------
Achieve unprecedented app performance and reliability
What every C/C++ and Fortran developer should know.
Learn how Intel has extended the reach of its next-generation tools
to help boost performance applications - inlcuding clusters.
http://p.sf.net/sfu/intel-dev2devmay
_______________________________________________
qooxdoo-devel mailing list
qooxdoo-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to