> It would be confusing to change the semantics of existing selectedIndex. It 
> looks like very imperative operator which is not appropriate for using 
> element attribute declaration.

...and yet BXML, which uses attributes extensively, handles it just fine.  :-)

> The clearer approach would be to introduce new declarative attribute operator 
> like selectedDefaultIndex, which will not apply immediately for the existing 
> element list.

When would it be applied? This is what I mean when I say it would be more 
confusing. I know immediately what "selectedIndex" and setSelectedIndex() do. I 
have no idea what "selectedDefaultIndex" means.

> But as you will see, we need to know which attributes need to be defined 
> later, we must have detailed knowledge for the API. these are not so 
> easy/simple API for the user.

I think you may be getting hung up on trying to automatically generate code 
that is organized the way you want it. A developer writing out your builder 
syntax by hand will know when it is appropriate to call each setter, and (once 
again) it does not matter where these attributes are set in generated code.

G

Reply via email to