pivot-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Greg Brown <gk_br...@verizon.net>
Subject Re: [pivot] are there any tools to convert bxml to Java?
Date Mon, 03 Jan 2011 21:35:02 GMT
Here's an example of what I mean. The following two files generate the exact same output:

http://svn.apache.org/repos/asf/pivot/trunk/examples/src/org/apache/pivot/examples/builder/BuilderExample.java
http://svn.apache.org/repos/asf/pivot/trunk/examples/src/org/apache/pivot/examples/builder/builder_example.bxml

The Java version uses your builder pattern, but sets the property values after processing
the child content. I don't think readability suffers in the least - the logic is still quite
easy to follow.

G

On Jan 3, 2011, at 4:09 PM, Greg Brown wrote:

>> I understand your position. But the attribute order, final classes issues are independent
from BXML to Java converter.
>> The current API will prohibit readable Java code written by hand.
>> If you check the generated code sample in my github, and move all attributes after
all of inner elements declaration, you will not like to have that codes.
> 
> The final class issue is definitely a problem for your pattern. But I don't see the issue
with attribute ordering. There's simply no way to set the selectedIndex property of a tab
pane before the tabs have been created. It has to be done afterwards.
> 
> 
> 
> 
> 


Mime
View raw message