First problem:
I think you are right. We should use constructor by default (without any 
parameters). Any attribute in tag we can set in object (as you wrote).
For user data (and any other methods with number of parameter more than 
one) we can write new tag. For example:
<qx:someWidget>
    <qx:method name="setUserData" params="key,1"/>
</qx:someWidget>
I think that isn't very simple notation but it's very flexible, because 
we can process all methods with help of only one tag. I'm sure this 
method isn't the best and it's only first idea.

Second problem:
I would like to reproduce this problem in js I understand this problem 
more deeper. Thanks, I'll see sources PHP QxBuilder .

Christian Boulanger wrote:
> The general logic is the following
>
> <parentTag attribute1="value1" attribute2="value2" >
>     <childTag attribute3="value3" attribute4="value4">
>        <eventListenerTag ...>
>     </childTag>
> </parentTag>
>
> the generated code looks like this:
>
> var qx_1 = new parentTag(<constructor vars>);
>
> here is the first problem: how does the parser know which of the 
> attributes should be used as constructor vars? Two solutions:
> a) All classes should be able to be called without constructor vars (good)
> b) the parser needs a lookup-table to choose constructor vars from 
> attributes (bad)
>
> qx_1. set({ <attribute1>:<value1>, <attribute2>:<value2> });
>
> Next problem: what about properties that need two or more pieces of 
> information? Such as userData or dimension or padding etc. etc. The 
> parser needs to take care of this through internal lookups.
>
> Now the child needs to be instantiated, configured, and added to the parent.
>
> var qx_2 = new childTag(<constructor vars>);
> qx_2. set({ <attribute3>:<value3>, <attribute4>:<value4> });
>
> qx_1.add (qx.2);
>
> This raises all sorts of problems. qooxdoo (at least in 0.5) doesn't 
> have a linear widget hierarchy. Some widgets need to be added to the top 
> widgets and not its parent, and then added to the parent through a 
> property, for example in menus.
>
> There are plenty of other little exceptions. If you look at the PHP 
> QxBuilder code (do you read PHP?) you can get an idea. You can check it 
> out with subversion at
>
> https://svn.sourceforge.net/svnroot/bibliograph/QxBuilder
>
> When I have time, I could draw up a flow chart to illustrate which 
> decisions have to be made at which point - although the logic of XSLT is 
> obviously different from procedural PHP.
>
> Cheers,
>
> Christian
>
> -------------------------------------------------------------------------
> Using Tomcat but need to do more? Need to support web services, security?
> Get stuff done quickly with pre-integrated technology to make your job easier
> Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
> http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
> _______________________________________________
> qooxdoo-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel
>
>   


-------------------------------------------------------------------------
Using Tomcat but need to do more? Need to support web services, security?
Get stuff done quickly with pre-integrated technology to make your job easier
Download IBM WebSphere Application Server v.1.0.1 based on Apache Geronimo
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=120709&bid=263057&dat=121642
_______________________________________________
qooxdoo-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/qooxdoo-devel

Reply via email to