PDA

View Full Version : [CLOSED] Component Config - Add custom property issues



markofsine
11 Feb 2012, 5:49 AM
In certain instances you may need to add custom properties, either when the property is missing, or perhaps for your own usage.
This works fine for a basic 'string' type property, but what if you want to add other types of properties, such as:
Array,
as in [ 'val1', 'val2' ]
function reference,
as in this.onSomeFunction
inline function (closure),

as in function() { return 'hello'; }
Integer values

as in 44 - (although a string might work for this it is not clean)
Boolean

In all the above cases, the value generated is wrapped in quotes. There should be some method to add the type of properties.

aconran
13 Feb 2012, 10:28 AM
The designer will detect what type of property you add and it defaults to string.

If you type "myCustomProperty" and click add it will add a custom property with type of string.

If you type "myCustomArray: ['val1', 'val2']" and click add it will add a custom property with type of array.

Etc

aconran
15 Feb 2012, 2:33 PM
Marking this bug thread as closed. If there anything you notice that doesn't work as I stated above, please let us know.

Phil.Strong
21 Feb 2012, 12:27 PM
Perhaps we need a way to click add (with nothing in the filter) that pops up a nice dialog to choose type and enter name and value?