So:
You see at the side there are checkboxes showing you which properties or which classe(s) you are looking at, if there are no checkboxes it means there isnt any multiple classes that have that doc group, so yeah, you are looking at inherited properties, though you are right in that its a little confusing, it should probably have a checkbox there regardless (even just a single one) saying where it got its field from (Component in this case)
The docs there are pretty woefully out of date, however, id
and text
have been there forever, so that is more likely a bug in the docgen i created, ill have to take a look at it, i guess i need to gen new docs anyway…
Ian
PS: yeah, functions wont work in xml attributes… basically if you have this:
<button text="bob" />
The macro will turn that into:
var c0 = new Button();
c0.text = "bob";
So if you had:
<button someFunction="bob" />
The macro would turn that into:
var c0 = new Button();
c0.someFunction = "bob";
Which would almost certainly fail to compile.
Note that:
<button text="Button" onclick="this.text='Bob'" />
will work and its a special case (the macro will look for attributes with “on” and wire up the event “click” to a script "this.text = ‘bob’ " (this being set in the script vars to the event target), scripting is very useful in some cases, especially for tiny apps / ui changes / tests, consider:
<vbox>
<script>
function someFunction(p) {
tf.text = "set2 - " + p;
}
</script>
<textfield id='tf' />
<button text="set 1" onclick="tf.text = 'set1' "/>
<button text="set 2" onclick="someFunction('someParam')"/>
</vbox>