Hi all,

I have prototyped the typed styles feature I suggested yesterday and it works 
very well. Component#setSkin() automatically applies any matching style 
definitions to components as they are instantiated.

The only issue I ran into involves naming conventions. My original logic in 
setSkin() looked for files on the classpath named <fully-qualified class 
name>.json. Unfortunately, this conflicts with resource bundles, which use the 
same naming convention.

I am currently thinking that we should use more specific extensions for these 
file types; e.g. .styles and .resources. I think this would work well for a 
couple of reasons:

1) It allows a developer to clearly identify what the file contains and what 
type it is associated with:

MyComponent.java
my_component.bxml
MyComponent.styles
MyComponent.resources

Of course, now that I see it broken out like this, it makes me wonder if the 
BXML naming convention should parallel the others and use camel case instead of 
underscores (at least, when the root element corresponds to a Bindable 
code-behind class).

2) It would allow us to register editors for these types in an IDE.

Thoughts?

G

Reply via email to