> ...skins are a royal pain.  I can sorta see how they provide an avenue to 
> extravagant customization, like WPF control templates do.  But to the average 
> programmer, the distinction between component classes and their skins and 
> which properties live where frequently seems arbitrary.  Every time I want to 
> set attributes on an object, I have to look two places in the javadocs, and 
> use two different syntaxes in bxml.  
...
> Sorry to rant like that, but the preceding paragraph spells out what I think 
> is by far the greatest weakness of the Pivot framework.

I agree that this can be kind of a pain, but it does have benefits. The 
separation of styles and intrinsic properties provides us with the flexibility 
to vary skin implementations without breaking binary compatibility. FWIW, HTML 
has the same usability issue - some properties are specified as CSS styles, 
while others are simply element attributes.

Note that you can use the following syntax to set styles if you prefer:

<Label text="Hello World">
  <styles color="#ff0000" font="Arial BOLD 24"/>
</Label>

This is more consistent with how values are set elsewhere in BXML. The JSON 
syntax is supported more for legacy reasons than anything else.

> Add to that the fact that there's no smart editor for bxml files, and the 
> result is it takes me an order of magnitude longer to write a bxml file than 
> it does to write the corresponding xaml file in WPF.

I agree. I really appreciate Eclipse's code completion features in Java, and I 
do miss having them when editing BXML.

> Meanwhile, I guess I should just submit a feature request?  Seems like adding 
> an "AcceptsEnter" property to TextAreaSkin ought to be a super easy change.

A feature request would be good - though a boolean "multiline" style might be 
clearer.

G

Reply via email to