On 12/2/16, 5:07 PM, "Christian Gotschim" <m...@vulcansoft.com> wrote:

>
>I guess for something where I can read the most common properties
>and styles from. Let’s take the org.apache.flex.html.Button.json: it lists
>only the constructor and the click event. But I still don’t know how
>to (or if I can) set x and y, or if it got left-right-top-bottom, or
>width/height to name
>just a few. And those are exactly the things I wanted to put in the
>snippets (and possibly a documentation website along the way).
>I also couldn’t find any default values included in the JSON files
>(i.e. selected on a CheckBox), no possible values (i.e. true/false for
>CheckBox), no type info (i.e. Boolean for selected).

Wow, you're right there is information missing.  I'll look into adding it.
 You will have to chase down baseClassNames though.  CheckBox doesn't
really have much, most of what it you are looking for it will get from
UIButtonBase.

>
>The html5.Button.json for instance only has this in it:
>
>{ "type": "class",
>  "qname": "org.apache.flex.html5.Button",
>  "baseClassname": "org.apache.flex.html.Button",
>  }
>
>Ok, going to the base class I get only the constructor and click
>event (see top).
>

Same thing. You'll have to keep chasing baseClassnames from Button to
ButtonBase to UIButtonBase.

>
>I wanted to mainly have a list of MXML components so people could
>just insert the snippet, change the already presented values, and then
>go from there knowing that the properties they set are relevant.
>
>The other day I tried modifying the Hello World example a bit by
>changing properties of a js:Label
>
>                       lbl2.width                              = 300;
>                       lbl2.height                             = 300;
>                       lbl2.scaleY                             = 3;
>                       lbl2.alpha                              = 0.5;
>                       lbl2.rotation                           = 45;
>                       lbl2.x                                  = 200;
>                       lbl2.scaleX                             = 0.5;
>
>… and found out that only the alpha and x changed on the label, while
>the other settings didn’t produce an error but also didn’t do anything.
>
>Any ideas?

One of the things I'm working on is exactly this problem.  The SWF classes
might be based on Sprite and so will look like they have scaleX/Y, but the
JS version of those classes won't have those APIs (yet).  The goal is to
get the compiler to report errors about the use of APIs missing on the JS
classes.

-Alex

Reply via email to