Hi,

Following situation:

We have a C++ data structure which is a tree of nodes. Each node has a name and represents a double value or double array or a child list of nodes. The tree is quite large. There is one C++ funtion "F" which operates on a part of the tree. We would like to have a scripting interface for it using QScript. I have a couple of questions where I only need some pointers to the right design and the right classes/examples since right now I am not even able to ask the right questions.

In JavaScript we would like to something like

Tree.a.b = 3.2
Tree.f.s.a = 4
F() or even better F(Tree.f)
print(Tree.f.s.b)
Tree.f.s.a = 4
F(Tree.f)
print(Tree.f.s.b)
...

1) First we have to copy the tree somehow to script variables? What is the strategy and which of the QT-examples ist most approbiate?
2) To call C++-"F" from javascript-"F" is quite clear.
3) With a call to JavaScript F(Tree.f) can I change Tree.f or is this read only?
4) After Tree.f.s.a = 4, how can I copy data from JavaScript to C++-Tree without having to copy all data? Is there some signal when a JavaScript variables changes or somethin similar?
5) After calling F we have marks in the C++Tree so that we know in principal which nodes to update back to Javascript.

Points 3/4 is most unknown for me.

Thanks for your help!

Thomas