
| Key: |
SDK-16179
|
| Type: |
Feature Request
|
| Status: |
Deferred
|
| Priority: |
None
|
| Assignee: |
Matt Chotin
|
| Reporter: |
Tink
|
| Votes: |
3
|
| Watchers: |
1
|
|
If you were logged in you would be able to see more operations.
|
|
|
|
It's quite often that I want to create a class where I can only set some properties on it once when it is created.
The standard and most explicit way of doing this is to pass the parameters through in the constructor. This is something tht is used all the time in lots of languages and a standard part of programming.
This is currently not possible with MXML, so the only way is to have a setter which once set throws and error. This is less than ideal!
I would like to see the ability to add constructor parameters though in an MXML tag, the compiler type checking the parameters etc. Something like...
<controls:Component parameters="{5, 'tink'}"/>
|
|
Description
|
It's quite often that I want to create a class where I can only set some properties on it once when it is created.
The standard and most explicit way of doing this is to pass the parameters through in the constructor. This is something tht is used all the time in lots of languages and a standard part of programming.
This is currently not possible with MXML, so the only way is to have a setter which once set throws and error. This is less than ideal!
I would like to see the ability to add constructor parameters though in an MXML tag, the compiler type checking the parameters etc. Something like...
<controls:Component parameters="{5, 'tink'}"/>
|
Show » |
|
All
|
Comments
|
|
Sort Order:
|
|
<controls:Component>
<controls:constructor>
<mx:Number value="5"/>
<mx:String value="5"/>
</controls:constructor>
</controls:Component>
This would also require the ability to create primitive datatypes and assign a value to them inline in MXML.