You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@flex.apache.org by Christian Gotschim <mi...@vulcansoft.com> on 2016/12/02 04:49:35 UTC

Snippets for FlexJS

I've been thinking about the complaints I’ve read on this list about the missing documentation for FlexJS and I’d like to do something to help out. I’ve used AS3/Flex for many years, and I’m now trying to get a hang of FlexJS.

So I thought it might be a good starting point for FlexJS newbies (like me) to have snippets for most or all components that FlexJS has to offer, and make them useable in Josh’s NextGenAS VSCode extension.

I’d be happy to create the snippets, but I would need someone experienced to write a list of FlexJS components as a starting point.

The list would have to be in MXML format and the components could have multiple lines, include beads and strands, and useful/common properties and styles like x, y, width, height, color, fontsize, paddings, alignments, etc.  Something like this:

<s:VGroup id="vg" x="10" y="20" gap="10"
    paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"
    horizontalAlign="left" verticalAlign="top" ....... />

<s:Label id="lbl" color=“0xff0000” fontSize=“20” fontWeight=“bold” fontStyle=“italic" textAlign=“center” text=“some text" ........ />


IMO, that would go a long way to make up for the missing docs and allow newbies to get started much faster.

Anyone?

-Christian


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.
Well, this took a bit longer than I expected, but I did finally get what I
think is the foundation of a FlexJS ASDoc app up and running (well,
crawling...).  More about this in another thread, but you might be able to
work from the code to get the aggregations you want for your snippets.

HTH,
-Alex

On 12/5/16, 10:10 PM, "Alex Harui" <ah...@adobe.com> wrote:

>Hi Christian,
>
>The JSON files are intended for a future ASDoc app written in FlexJS.  I
>expect small JSON files to perform better than one big file of JSON or
>XML.  It allows for lazy loading of data.  Also, the compiler is oriented
>towards producing lots of small files because each class is being
>processed in its own thread.
>
>A volunteer could write an aggregator app that reads in all of the JSON
>files and produces the output you want.  Also note that the ASDoc compiler
>in the regular Flex SDK produces an XML file format that has slightly more
>aggregation (all classes in a package in a single file).  You can see
>these files here [1].  These also could be aggregated into the file format
>you want.
>
>I've got about 4 bugs in the queue.  When I get through those, I will take
>some time to get started on the ASDoc app in FlexJS.  You might be able to
>borrow some of that code to either get the format you want, or get the
>data you want.
>
>HTH,
>-Alex
>
>[1] http://home.apache.org/~aharui/FlexJS/tempdita.zip
>
>
>On 12/5/16, 6:30 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:
>
>>Hi Alex,
>>
>>Thanks for the updated file. After looking over the contents I was
>>surprised how many classes are involved and how easy it is to get
>>lost in all that. In order to get a better overview of all this I would
>>suggest to put all the different JSON files into a single
>>XML file that can then be traversed via e4x much more easily.
>>
>>Something like this:
>>
>><classes>
>>	<class name="org.apache.flex.core.UIButtonBase"
>>base="UIHTMLElementWrapper" desc="The UIHTMLElementWrapper class is the
>>base class for most Buttons and other UI objects in a FlexJS application
>>that do not have children.">
>>		<constructor params=""/>
>>		<prop qname="x" access="read-write" ns="public" override="true"
>>return="value" desc=""/>
>>		<prop qname="y" access="read-write" ns="public" override="true"
>>return="value" desc=""/>
>>		<prop qname="height" access="read-write" ns="public" return="Number"
>>bindable="heightChanged" override="true" desc=""/>
>>		<prop qname="$height" access="read-only" ns="public" return="Number"
>>desc="Retrieve the low-level bounding box height. Not implemented in
>>JS."/>
>>		<method qname="createElement" ns="protected" params=""
>>return="IFlexJSElement" desc=""/>
>>	</class>
>>	<class name=“…. next class …/>
>>	<class name=“…. next class …/>
>>	<class name=“…. next class …/>
>></classes>
>>
>>This XML could be used as a dataProvider for a help page, would
>>be easier to read out info for snippets, and it would also be easier
>>for anybody reading just the XML file (instead of tons of JSON files).
>>
>>What do you think?
>>
>>- Christian
>>
>>
>>
>>> On Dec 6, 2016, at 2:01 AM, Alex Harui <ah...@adobe.com> wrote:
>>> 
>>> Thanks for looking.  I think I've fixed these issues and updated the
>>>zip.
>>> There's probably more, so maybe after I get caught up on compiler bugs
>>> I'll write the basis of the AIR app that will display ASDoc which will
>>> then read all of these files and find more problems.
>>> 
>>> -Alex
>>> 
>>> On 12/5/16, 2:11 PM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> One last one:
>>>> ToolTipBead.json has TWO trailing commas near the end of the file.
>>>> 
>>>> On Dec 6, 2016, at 12:10 AM, Harbs <ha...@gmail.com> wrote:
>>>> 
>>>>> Some more:
>>>>> 
>>>>> CurrencyFormatter.json has the following:
>>>>> 
>>>>>         "params": [{ name: "value", type: "Object"}
>>>>> 
>>>>> name and type need to be surrounded by quotes.
>>>>> 
>>>>> I’m done for the night… ;-)
>>>>> 
>>>>> On Dec 6, 2016, at 12:07 AM, Harbs <ha...@gmail.com> wrote:
>>>>> 
>>>>>> Accordion.json looks like it has two errors as well:
>>>>>> 1. The leading comma here:
>>>>>> "members": [
>>>>>> ,
>>>>>> 2. The trailing comma here:
>>>>>> "namespace": "public”,
>>>>>> 
>>>>>> On Dec 6, 2016, at 12:04 AM, Harbs <ha...@gmail.com> wrote:
>>>>>> 
>>>>>>> That looks good.
>>>>>>> 
>>>>>>> I randomly opened some other files and ComboBox has the following
>>>>>>> error:
>>>>>>> 
>>>>>>> parse error: invalid object key (must be a string)
>>>>>>>       he.flex.events.Event",       }]   }
>>>>>>>                  (right here) ------^
>>>>>>> 
>>>>>>> The problem looks like a trailing comma near the end of the file.
>>>>>>> (after Event)
>>>>>>> 
>>>>>>> On Dec 5, 2016, at 11:57 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>>> 
>>>>>>>> Thanks for checking.  I think I have it as valid JSON now and
>>>>>>>> updated the
>>>>>>>> zip.
>>>>>>>> 
>>>>>>>> -Alex
>>>>>>>> 
>>>>>>>> On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:
>>>>>>>> 
>>>>>>>>> It looks like there’s an error in the JSON. I opened
>>>>>>>>>CheckBox.json
>>>>>>>>> and I
>>>>>>>>> got the following error:
>>>>>>>>> 
>>>>>>>>> parse error: after key and value, inside map, I expect ',' or '}'
>>>>>>>>>          "values": ["3.0"]}  ]  "return": "",           "params"
>>>>>>>>>                (right here) ———^
>>>>>>>>> 
>>>>>>>>> It looks like there’s a comma missing.
>>>>>>>>> 
>>>>>>>>> On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>>>>> 
>>>>>>>>>> I just pushed a new set of json files.  The accessors should now
>>>>>>>>>> have
>>>>>>>>>> "return" fields.
>>>>>>>>>> Looks like default values are supposed to come from @default
>>>>>>>>>>tags
>>>>>>>>>> in the
>>>>>>>>>> ASDoc, which we haven't written yet. I added one to CheckBox
>>>>>>>>>>just
>>>>>>>>>> to see
>>>>>>>>>> if it would work and it does appear in the output.  We would
>>>>>>>>>>need
>>>>>>>>>> some
>>>>>>>>>> volunteers to help populate the ASDoc with @default tags.
>>>>>>>>>> 
>>>>>>>>>> Let me know if there are other things missing.
>>>>>>>>>> 
>>>>>>>>>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>>>>>>>>>> 
>>>>>>>>>> 
>>>>>>>>>> Thanks,
>>>>>>>>>> -Alex
>>>>>>>>>> 
>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>>
>


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.
Hi Christian,

The JSON files are intended for a future ASDoc app written in FlexJS.  I
expect small JSON files to perform better than one big file of JSON or
XML.  It allows for lazy loading of data.  Also, the compiler is oriented
towards producing lots of small files because each class is being
processed in its own thread.

A volunteer could write an aggregator app that reads in all of the JSON
files and produces the output you want.  Also note that the ASDoc compiler
in the regular Flex SDK produces an XML file format that has slightly more
aggregation (all classes in a package in a single file).  You can see
these files here [1].  These also could be aggregated into the file format
you want.

I've got about 4 bugs in the queue.  When I get through those, I will take
some time to get started on the ASDoc app in FlexJS.  You might be able to
borrow some of that code to either get the format you want, or get the
data you want.

HTH,
-Alex

[1] http://home.apache.org/~aharui/FlexJS/tempdita.zip


On 12/5/16, 6:30 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:

>Hi Alex,
>
>Thanks for the updated file. After looking over the contents I was
>surprised how many classes are involved and how easy it is to get
>lost in all that. In order to get a better overview of all this I would
>suggest to put all the different JSON files into a single
>XML file that can then be traversed via e4x much more easily.
>
>Something like this:
>
><classes>
>	<class name="org.apache.flex.core.UIButtonBase"
>base="UIHTMLElementWrapper" desc="The UIHTMLElementWrapper class is the
>base class for most Buttons and other UI objects in a FlexJS application
>that do not have children.">
>		<constructor params=""/>
>		<prop qname="x" access="read-write" ns="public" override="true"
>return="value" desc=""/>
>		<prop qname="y" access="read-write" ns="public" override="true"
>return="value" desc=""/>
>		<prop qname="height" access="read-write" ns="public" return="Number"
>bindable="heightChanged" override="true" desc=""/>
>		<prop qname="$height" access="read-only" ns="public" return="Number"
>desc="Retrieve the low-level bounding box height. Not implemented in
>JS."/>
>		<method qname="createElement" ns="protected" params=""
>return="IFlexJSElement" desc=""/>
>	</class>
>	<class name=“…. next class …/>
>	<class name=“…. next class …/>
>	<class name=“…. next class …/>
></classes>
>
>This XML could be used as a dataProvider for a help page, would
>be easier to read out info for snippets, and it would also be easier
>for anybody reading just the XML file (instead of tons of JSON files).
>
>What do you think?
>
>- Christian
>
>
>
>> On Dec 6, 2016, at 2:01 AM, Alex Harui <ah...@adobe.com> wrote:
>> 
>> Thanks for looking.  I think I've fixed these issues and updated the
>>zip.
>> There's probably more, so maybe after I get caught up on compiler bugs
>> I'll write the basis of the AIR app that will display ASDoc which will
>> then read all of these files and find more problems.
>> 
>> -Alex
>> 
>> On 12/5/16, 2:11 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> One last one:
>>> ToolTipBead.json has TWO trailing commas near the end of the file.
>>> 
>>> On Dec 6, 2016, at 12:10 AM, Harbs <ha...@gmail.com> wrote:
>>> 
>>>> Some more:
>>>> 
>>>> CurrencyFormatter.json has the following:
>>>> 
>>>>         "params": [{ name: "value", type: "Object"}
>>>> 
>>>> name and type need to be surrounded by quotes.
>>>> 
>>>> I’m done for the night… ;-)
>>>> 
>>>> On Dec 6, 2016, at 12:07 AM, Harbs <ha...@gmail.com> wrote:
>>>> 
>>>>> Accordion.json looks like it has two errors as well:
>>>>> 1. The leading comma here:
>>>>> "members": [
>>>>> ,
>>>>> 2. The trailing comma here:
>>>>> "namespace": "public”,
>>>>> 
>>>>> On Dec 6, 2016, at 12:04 AM, Harbs <ha...@gmail.com> wrote:
>>>>> 
>>>>>> That looks good.
>>>>>> 
>>>>>> I randomly opened some other files and ComboBox has the following
>>>>>> error:
>>>>>> 
>>>>>> parse error: invalid object key (must be a string)
>>>>>>       he.flex.events.Event",       }]   }
>>>>>>                  (right here) ------^
>>>>>> 
>>>>>> The problem looks like a trailing comma near the end of the file.
>>>>>> (after Event)
>>>>>> 
>>>>>> On Dec 5, 2016, at 11:57 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>> 
>>>>>>> Thanks for checking.  I think I have it as valid JSON now and
>>>>>>> updated the
>>>>>>> zip.
>>>>>>> 
>>>>>>> -Alex
>>>>>>> 
>>>>>>> On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:
>>>>>>> 
>>>>>>>> It looks like there’s an error in the JSON. I opened CheckBox.json
>>>>>>>> and I
>>>>>>>> got the following error:
>>>>>>>> 
>>>>>>>> parse error: after key and value, inside map, I expect ',' or '}'
>>>>>>>>          "values": ["3.0"]}  ]  "return": "",           "params"
>>>>>>>>                (right here) ———^
>>>>>>>> 
>>>>>>>> It looks like there’s a comma missing.
>>>>>>>> 
>>>>>>>> On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>>>> 
>>>>>>>>> I just pushed a new set of json files.  The accessors should now
>>>>>>>>> have
>>>>>>>>> "return" fields.
>>>>>>>>> Looks like default values are supposed to come from @default tags
>>>>>>>>> in the
>>>>>>>>> ASDoc, which we haven't written yet. I added one to CheckBox just
>>>>>>>>> to see
>>>>>>>>> if it would work and it does appear in the output.  We would need
>>>>>>>>> some
>>>>>>>>> volunteers to help populate the ASDoc with @default tags.
>>>>>>>>> 
>>>>>>>>> Let me know if there are other things missing.
>>>>>>>>> 
>>>>>>>>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>>>>>>>>> 
>>>>>>>>> 
>>>>>>>>> Thanks,
>>>>>>>>> -Alex
>>>>>>>>> 
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
>


Re: Snippets for FlexJS

Posted by Christian Gotschim <mi...@vulcansoft.com>.
Hi Alex,

Thanks for the updated file. After looking over the contents I was
surprised how many classes are involved and how easy it is to get
lost in all that. In order to get a better overview of all this I would 
suggest to put all the different JSON files into a single
XML file that can then be traversed via e4x much more easily. 

Something like this:

<classes>
	<class name="org.apache.flex.core.UIButtonBase" base="UIHTMLElementWrapper" desc="The UIHTMLElementWrapper class is the base class for most Buttons and other UI objects in a FlexJS application that do not have children.">
		<constructor params=""/>
		<prop qname="x" access="read-write" ns="public" override="true" return="value" desc=""/>
		<prop qname="y" access="read-write" ns="public" override="true" return="value" desc=""/>
		<prop qname="height" access="read-write" ns="public" return="Number" bindable="heightChanged" override="true" desc=""/>
		<prop qname="$height" access="read-only" ns="public" return="Number" desc="Retrieve the low-level bounding box height. Not implemented in JS."/>
		<method qname="createElement" ns="protected" params="" return="IFlexJSElement" desc=""/>
	</class>
	<class name=“…. next class …/>
	<class name=“…. next class …/>
	<class name=“…. next class …/>
</classes>

This XML could be used as a dataProvider for a help page, would
be easier to read out info for snippets, and it would also be easier
for anybody reading just the XML file (instead of tons of JSON files).

What do you think?

- Christian



> On Dec 6, 2016, at 2:01 AM, Alex Harui <ah...@adobe.com> wrote:
> 
> Thanks for looking.  I think I've fixed these issues and updated the zip.
> There's probably more, so maybe after I get caught up on compiler bugs
> I'll write the basis of the AIR app that will display ASDoc which will
> then read all of these files and find more problems.
> 
> -Alex
> 
> On 12/5/16, 2:11 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> One last one:
>> ToolTipBead.json has TWO trailing commas near the end of the file.
>> 
>> On Dec 6, 2016, at 12:10 AM, Harbs <ha...@gmail.com> wrote:
>> 
>>> Some more:
>>> 
>>> CurrencyFormatter.json has the following:
>>> 
>>>         "params": [{ name: "value", type: "Object"}
>>> 
>>> name and type need to be surrounded by quotes.
>>> 
>>> I’m done for the night… ;-)
>>> 
>>> On Dec 6, 2016, at 12:07 AM, Harbs <ha...@gmail.com> wrote:
>>> 
>>>> Accordion.json looks like it has two errors as well:
>>>> 1. The leading comma here:
>>>> "members": [
>>>> ,
>>>> 2. The trailing comma here:
>>>> "namespace": "public”,
>>>> 
>>>> On Dec 6, 2016, at 12:04 AM, Harbs <ha...@gmail.com> wrote:
>>>> 
>>>>> That looks good.
>>>>> 
>>>>> I randomly opened some other files and ComboBox has the following
>>>>> error:
>>>>> 
>>>>> parse error: invalid object key (must be a string)
>>>>>       he.flex.events.Event",       }]   }
>>>>>                  (right here) ------^
>>>>> 
>>>>> The problem looks like a trailing comma near the end of the file.
>>>>> (after Event)
>>>>> 
>>>>> On Dec 5, 2016, at 11:57 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>> 
>>>>>> Thanks for checking.  I think I have it as valid JSON now and
>>>>>> updated the
>>>>>> zip.
>>>>>> 
>>>>>> -Alex
>>>>>> 
>>>>>> On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:
>>>>>> 
>>>>>>> It looks like there’s an error in the JSON. I opened CheckBox.json
>>>>>>> and I
>>>>>>> got the following error:
>>>>>>> 
>>>>>>> parse error: after key and value, inside map, I expect ',' or '}'
>>>>>>>          "values": ["3.0"]}  ]  "return": "",           "params"
>>>>>>>                (right here) ———^
>>>>>>> 
>>>>>>> It looks like there’s a comma missing.
>>>>>>> 
>>>>>>> On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>>> 
>>>>>>>> I just pushed a new set of json files.  The accessors should now
>>>>>>>> have
>>>>>>>> "return" fields.
>>>>>>>> Looks like default values are supposed to come from @default tags
>>>>>>>> in the
>>>>>>>> ASDoc, which we haven't written yet. I added one to CheckBox just
>>>>>>>> to see
>>>>>>>> if it would work and it does appear in the output.  We would need
>>>>>>>> some
>>>>>>>> volunteers to help populate the ASDoc with @default tags.
>>>>>>>> 
>>>>>>>> Let me know if there are other things missing.
>>>>>>>> 
>>>>>>>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>>>>>>>> 
>>>>>>>> 
>>>>>>>> Thanks,
>>>>>>>> -Alex
>>>>>>>> 
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.
Thanks for looking.  I think I've fixed these issues and updated the zip.
There's probably more, so maybe after I get caught up on compiler bugs
I'll write the basis of the AIR app that will display ASDoc which will
then read all of these files and find more problems.

-Alex

On 12/5/16, 2:11 PM, "Harbs" <ha...@gmail.com> wrote:

>One last one:
>ToolTipBead.json has TWO trailing commas near the end of the file.
>
>On Dec 6, 2016, at 12:10 AM, Harbs <ha...@gmail.com> wrote:
>
>> Some more:
>> 
>> CurrencyFormatter.json has the following:
>> 
>>          "params": [{ name: "value", type: "Object"}
>> 
>> name and type need to be surrounded by quotes.
>> 
>> I’m done for the night… ;-)
>> 
>> On Dec 6, 2016, at 12:07 AM, Harbs <ha...@gmail.com> wrote:
>> 
>>> Accordion.json looks like it has two errors as well:
>>> 1. The leading comma here:
>>> "members": [
>>> ,
>>> 2. The trailing comma here:
>>> "namespace": "public”,
>>> 
>>> On Dec 6, 2016, at 12:04 AM, Harbs <ha...@gmail.com> wrote:
>>> 
>>>> That looks good.
>>>> 
>>>> I randomly opened some other files and ComboBox has the following
>>>>error:
>>>> 
>>>> parse error: invalid object key (must be a string)
>>>>        he.flex.events.Event",       }]   }
>>>>                   (right here) ------^
>>>> 
>>>> The problem looks like a trailing comma near the end of the file.
>>>>(after Event)
>>>> 
>>>> On Dec 5, 2016, at 11:57 PM, Alex Harui <ah...@adobe.com> wrote:
>>>> 
>>>>> Thanks for checking.  I think I have it as valid JSON now and
>>>>>updated the
>>>>> zip.
>>>>> 
>>>>> -Alex
>>>>> 
>>>>> On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:
>>>>> 
>>>>>> It looks like there’s an error in the JSON. I opened CheckBox.json
>>>>>>and I
>>>>>> got the following error:
>>>>>> 
>>>>>> parse error: after key and value, inside map, I expect ',' or '}'
>>>>>>           "values": ["3.0"]}  ]  "return": "",           "params"
>>>>>>                 (right here) ———^
>>>>>> 
>>>>>> It looks like there’s a comma missing.
>>>>>> 
>>>>>> On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>>> 
>>>>>>> I just pushed a new set of json files.  The accessors should now
>>>>>>>have
>>>>>>> "return" fields.
>>>>>>> Looks like default values are supposed to come from @default tags
>>>>>>>in the
>>>>>>> ASDoc, which we haven't written yet. I added one to CheckBox just
>>>>>>>to see
>>>>>>> if it would work and it does appear in the output.  We would need
>>>>>>>some
>>>>>>> volunteers to help populate the ASDoc with @default tags.
>>>>>>> 
>>>>>>> Let me know if there are other things missing.
>>>>>>> 
>>>>>>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>>>>>>> 
>>>>>>> 
>>>>>>> Thanks,
>>>>>>> -Alex
>>>>>>> 
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
>


Re: Snippets for FlexJS

Posted by Harbs <ha...@gmail.com>.
One last one:
ToolTipBead.json has TWO trailing commas near the end of the file.

On Dec 6, 2016, at 12:10 AM, Harbs <ha...@gmail.com> wrote:

> Some more:
> 
> CurrencyFormatter.json has the following:
> 
>          "params": [{ name: "value", type: "Object"}
> 
> name and type need to be surrounded by quotes.
> 
> I’m done for the night… ;-)
> 
> On Dec 6, 2016, at 12:07 AM, Harbs <ha...@gmail.com> wrote:
> 
>> Accordion.json looks like it has two errors as well:
>> 1. The leading comma here: 
>> "members": [
>> ,
>> 2. The trailing comma here:
>> "namespace": "public”,
>> 
>> On Dec 6, 2016, at 12:04 AM, Harbs <ha...@gmail.com> wrote:
>> 
>>> That looks good.
>>> 
>>> I randomly opened some other files and ComboBox has the following error:
>>> 
>>> parse error: invalid object key (must be a string)
>>>        he.flex.events.Event",       }]   } 
>>>                   (right here) ------^
>>> 
>>> The problem looks like a trailing comma near the end of the file. (after Event)
>>> 
>>> On Dec 5, 2016, at 11:57 PM, Alex Harui <ah...@adobe.com> wrote:
>>> 
>>>> Thanks for checking.  I think I have it as valid JSON now and updated the
>>>> zip.
>>>> 
>>>> -Alex
>>>> 
>>>> On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:
>>>> 
>>>>> It looks like there’s an error in the JSON. I opened CheckBox.json and I
>>>>> got the following error:
>>>>> 
>>>>> parse error: after key and value, inside map, I expect ',' or '}'
>>>>>           "values": ["3.0"]}  ]  "return": "",           "params"
>>>>>                 (right here) ———^
>>>>> 
>>>>> It looks like there’s a comma missing.
>>>>> 
>>>>> On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>>>>> 
>>>>>> I just pushed a new set of json files.  The accessors should now have
>>>>>> "return" fields.
>>>>>> Looks like default values are supposed to come from @default tags in the
>>>>>> ASDoc, which we haven't written yet. I added one to CheckBox just to see
>>>>>> if it would work and it does appear in the output.  We would need some
>>>>>> volunteers to help populate the ASDoc with @default tags.
>>>>>> 
>>>>>> Let me know if there are other things missing.
>>>>>> 
>>>>>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>>>>>> 
>>>>>> 
>>>>>> Thanks,
>>>>>> -Alex
>>>>>> 
>>>>> 
>>>> 
>>> 
>> 
> 


Re: Snippets for FlexJS

Posted by Harbs <ha...@gmail.com>.
Some more:

CurrencyFormatter.json has the following:

          "params": [{ name: "value", type: "Object"}

name and type need to be surrounded by quotes.

I’m done for the night… ;-)

On Dec 6, 2016, at 12:07 AM, Harbs <ha...@gmail.com> wrote:

> Accordion.json looks like it has two errors as well:
> 1. The leading comma here: 
> "members": [
>  ,
> 2. The trailing comma here:
> "namespace": "public”,
> 
> On Dec 6, 2016, at 12:04 AM, Harbs <ha...@gmail.com> wrote:
> 
>> That looks good.
>> 
>> I randomly opened some other files and ComboBox has the following error:
>> 
>> parse error: invalid object key (must be a string)
>>         he.flex.events.Event",       }]   } 
>>                    (right here) ------^
>> 
>> The problem looks like a trailing comma near the end of the file. (after Event)
>> 
>> On Dec 5, 2016, at 11:57 PM, Alex Harui <ah...@adobe.com> wrote:
>> 
>>> Thanks for checking.  I think I have it as valid JSON now and updated the
>>> zip.
>>> 
>>> -Alex
>>> 
>>> On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:
>>> 
>>>> It looks like there’s an error in the JSON. I opened CheckBox.json and I
>>>> got the following error:
>>>> 
>>>> parse error: after key and value, inside map, I expect ',' or '}'
>>>>            "values": ["3.0"]}  ]  "return": "",           "params"
>>>>                  (right here) ———^
>>>> 
>>>> It looks like there’s a comma missing.
>>>> 
>>>> On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>>>> 
>>>>> I just pushed a new set of json files.  The accessors should now have
>>>>> "return" fields.
>>>>> Looks like default values are supposed to come from @default tags in the
>>>>> ASDoc, which we haven't written yet. I added one to CheckBox just to see
>>>>> if it would work and it does appear in the output.  We would need some
>>>>> volunteers to help populate the ASDoc with @default tags.
>>>>> 
>>>>> Let me know if there are other things missing.
>>>>> 
>>>>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>>>>> 
>>>>> 
>>>>> Thanks,
>>>>> -Alex
>>>>> 
>>>> 
>>> 
>> 
> 


Re: Snippets for FlexJS

Posted by Harbs <ha...@gmail.com>.
Accordion.json looks like it has two errors as well:
1. The leading comma here: 
"members": [
  ,
2. The trailing comma here:
"namespace": "public”,

On Dec 6, 2016, at 12:04 AM, Harbs <ha...@gmail.com> wrote:

> That looks good.
> 
> I randomly opened some other files and ComboBox has the following error:
> 
> parse error: invalid object key (must be a string)
>          he.flex.events.Event",       }]   } 
>                     (right here) ------^
> 
> The problem looks like a trailing comma near the end of the file. (after Event)
> 
> On Dec 5, 2016, at 11:57 PM, Alex Harui <ah...@adobe.com> wrote:
> 
>> Thanks for checking.  I think I have it as valid JSON now and updated the
>> zip.
>> 
>> -Alex
>> 
>> On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:
>> 
>>> It looks like there’s an error in the JSON. I opened CheckBox.json and I
>>> got the following error:
>>> 
>>> parse error: after key and value, inside map, I expect ',' or '}'
>>>             "values": ["3.0"]}  ]  "return": "",           "params"
>>>                   (right here) ———^
>>> 
>>> It looks like there’s a comma missing.
>>> 
>>> On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>>> 
>>>> I just pushed a new set of json files.  The accessors should now have
>>>> "return" fields.
>>>> Looks like default values are supposed to come from @default tags in the
>>>> ASDoc, which we haven't written yet. I added one to CheckBox just to see
>>>> if it would work and it does appear in the output.  We would need some
>>>> volunteers to help populate the ASDoc with @default tags.
>>>> 
>>>> Let me know if there are other things missing.
>>>> 
>>>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>>>> 
>>>> 
>>>> Thanks,
>>>> -Alex
>>>> 
>>> 
>> 
> 


Re: Snippets for FlexJS

Posted by Harbs <ha...@gmail.com>.
That looks good.

I randomly opened some other files and ComboBox has the following error:

parse error: invalid object key (must be a string)
          he.flex.events.Event",       }]   } 
                     (right here) ------^

The problem looks like a trailing comma near the end of the file. (after Event)

On Dec 5, 2016, at 11:57 PM, Alex Harui <ah...@adobe.com> wrote:

> Thanks for checking.  I think I have it as valid JSON now and updated the
> zip.
> 
> -Alex
> 
> On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:
> 
>> It looks like there’s an error in the JSON. I opened CheckBox.json and I
>> got the following error:
>> 
>> parse error: after key and value, inside map, I expect ',' or '}'
>>              "values": ["3.0"]}  ]  "return": "",           "params"
>>                    (right here) ———^
>> 
>> It looks like there’s a comma missing.
>> 
>> On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>> 
>>> I just pushed a new set of json files.  The accessors should now have
>>> "return" fields.
>>> Looks like default values are supposed to come from @default tags in the
>>> ASDoc, which we haven't written yet. I added one to CheckBox just to see
>>> if it would work and it does appear in the output.  We would need some
>>> volunteers to help populate the ASDoc with @default tags.
>>> 
>>> Let me know if there are other things missing.
>>> 
>>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>>> 
>>> 
>>> Thanks,
>>> -Alex
>>> 
>> 
> 


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.
Thanks for checking.  I think I have it as valid JSON now and updated the
zip.

-Alex

On 12/5/16, 12:19 PM, "Harbs" <ha...@gmail.com> wrote:

>It looks like there’s an error in the JSON. I opened CheckBox.json and I
>got the following error:
>
>parse error: after key and value, inside map, I expect ',' or '}'
>               "values": ["3.0"]}  ]  "return": "",           "params"
>                     (right here) ———^
>
>It looks like there’s a comma missing.
>
>On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:
>
>> I just pushed a new set of json files.  The accessors should now have
>> "return" fields.
>> Looks like default values are supposed to come from @default tags in the
>> ASDoc, which we haven't written yet. I added one to CheckBox just to see
>> if it would work and it does appear in the output.  We would need some
>> volunteers to help populate the ASDoc with @default tags.
>> 
>> Let me know if there are other things missing.
>> 
>> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
>> 
>> 
>> Thanks,
>> -Alex
>> 
>


Re: Snippets for FlexJS

Posted by Harbs <ha...@gmail.com>.
It looks like there’s an error in the JSON. I opened CheckBox.json and I got the following error:

parse error: after key and value, inside map, I expect ',' or '}'
               "values": ["3.0"]}  ]  "return": "",           "params"
                     (right here) ———^

It looks like there’s a comma missing.

On Dec 5, 2016, at 9:38 PM, Alex Harui <ah...@adobe.com> wrote:

> I just pushed a new set of json files.  The accessors should now have
> "return" fields.
> Looks like default values are supposed to come from @default tags in the
> ASDoc, which we haven't written yet. I added one to CheckBox just to see
> if it would work and it does appear in the output.  We would need some
> volunteers to help populate the ASDoc with @default tags.
> 
> Let me know if there are other things missing.
> 
> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
> 
> 
> Thanks,
> -Alex
> 


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.
I just pushed a new set of json files.  The accessors should now have
"return" fields.
Looks like default values are supposed to come from @default tags in the
ASDoc, which we haven't written yet. I added one to CheckBox just to see
if it would work and it does appear in the output.  We would need some
volunteers to help populate the ASDoc with @default tags.

Let me know if there are other things missing.

[1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip


Thanks,
-Alex


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.

On 12/2/16, 5:07 PM, "Christian Gotschim" <mi...@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


Re: Snippets for FlexJS

Posted by Christian Gotschim <mi...@vulcansoft.com>.
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).

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).


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?

- Christian



> On Dec 3, 2016, at 1:12 AM, Alex Harui <ah...@adobe.com> wrote:
> 
> 
> 
> On 12/2/16, 2:14 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:
> 
>> OK, got the zip and looking at it. At first glance not really what I was
>> hoping for, but I’ll see.
> 
> What were you hoping for?
> 
> -Alex
> 


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.

On 12/2/16, 2:14 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:

>OK, got the zip and looking at it. At first glance not really what I was
>hoping for, but I’ll see.

What were you hoping for?

-Alex


Re: Snippets for FlexJS

Posted by Christian Gotschim <mi...@vulcansoft.com>.
OK, got the zip and looking at it. At first glance not really what I was
hoping for, but I’ll see. 

- Christian



> On Dec 2, 2016, at 6:53 PM, Alex Harui <ah...@adobe.com> wrote:
> 
> 
> 
> On 12/1/16, 10:41 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:
> 
>> 
>>> If you know Java, you could write a custom ASDoc emitter.  I've written
>>> one that outputs ASDoc information in JSON format.  Or you could write a
>>> Flex or FlexJS app to read the JSON files and generate the MXML you
>>> want.
>> 
>> I don’t know Java. I’d have to see the JSON file first to see if I can get
>> the necessary info out of that. Can you send it to me?
> 
> The JSON files are posted at [1].  The content/format of these files can
> be modified by changing the Java code in the compiler.
> 
> The list of all classes is in classes.json.  Individual classes have their
> own file.
> 
> [1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip
> 
> 
> Thanks,
> -Alex
> 


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.

On 12/1/16, 10:41 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:

>
>> If you know Java, you could write a custom ASDoc emitter.  I've written
>> one that outputs ASDoc information in JSON format.  Or you could write a
>> Flex or FlexJS app to read the JSON files and generate the MXML you
>>want.
>
>I don’t know Java. I’d have to see the JSON file first to see if I can get
>the necessary info out of that. Can you send it to me?

The JSON files are posted at [1].  The content/format of these files can
be modified by changing the Java code in the compiler.

The list of all classes is in classes.json.  Individual classes have their
own file.

[1] http://home.apache.org/~aharui/FlexJS/asdoc-output.zip


Thanks,
-Alex


Re: Snippets for FlexJS

Posted by Josh Tynjala <jo...@gmail.com>.
This just goes to show again that we need a dedicated page for each of the
Basic components with simple examples of the component's most common tasks.
Set the text on a button, and listen for some kind of click/tap event.
Populate a list's data provider, listen for a selection change event, and
change the selected index programatically. People can't figure out how to
use these core features of the components far too often, and then FlexJS
feels broken or unfinished.

- Josh

On Thu, Dec 1, 2016 at 10:41 PM, Christian Gotschim <mi...@vulcansoft.com>
wrote:

> Hi Alex,
>
> > Thanks for offering to help.  We could use all the help we can get.
> >
> > I don't know what your areas of expertise are and how much time you have,
> > and I don't quite know how you want to organize the list, but you might
> be
> > able to write code to build out the list of components.
>
> My expertise is in AS3 and Flex 4.6 with PHP and MySQL on the backend.
> I just recently tried FlexJS with the NextGenAS VSCode extension and
> it was tough to say the least! That’s how I came up with the idea of
> using snippets to get people start using FlexJS without giving up
> shortly after.
>
> Organizing the list: I would have to see what’s even in FlexJS, but
> basically
> having a prefix (like ‘ng’ (for NextGen)) and then the components
> classname. That way one could instantly see a list of all ng???
> components to use. So typing ngLabel will list the snippet and insert all
> the relevant properties/styles to tab through — better more than less
> and then just delete the ones not needed. I think that’s easier than
> looking around for a property/style that one doesn’t know about or
> if they’re relevant.
>
> Time: well, not enough like all of us ;)  But enough to get this done
> as proposed (list of components to snippets). I cannot write any
> documentation on FlexJS since I don’t know much about it at all yet.
>
>
> > If you know Java, you could write a custom ASDoc emitter.  I've written
> > one that outputs ASDoc information in JSON format.  Or you could write a
> > Flex or FlexJS app to read the JSON files and generate the MXML you want.
>
> I don’t know Java. I’d have to see the JSON file first to see if I can get
> the necessary info out of that. Can you send it to me?
>
>
> > One thing to keep in mind is that styles work a bit differently in FlexJS
> > than in Flex.  FlexJS currently doesn't document style properties because
> > on the JS-side the components are pretty much going to respond to every
> > CSS style that the browser knows about.  I suppose we could document
> which
> > of those styles are currently implemented for SWF, but I haven't heard
> too
> > many folks ask for that.
>
> I’ve been following this list for months and I get the feeling that people
> are
> really interested in FlexJS, but only a few know how to even get started
> with
> a basic app. Hence the idea that snippets (with input from the FlexJS
> developers themselves) in VSCode (while not replacing
> documantation) would at least allow people to get started faster. I’ve
> struggled with just finding a way to color the text of a label or if I’m
> even
> using the right label component (I think I had 3 listed in
> auto-completion).
> That’s very frustrating for someone who’s just writing a large
> Flex 4.6 app alone.
>
> Now if a snippet puts the code right there infront of me then I can see
> what properties/styles are relevant right away and even tab through them.
> I know there’s been talk of a wiki page and that would be great, but
> snippets would be more of a hands-on approach. And I think with
> Josh’s VSCode extension there’s a really good combination to get
> FlexJS out of the cellar (no pun intended) and into the hands of
> developers and companies.
> I recently had an interview for a contract and I told them about FlexJS.
> They
> were very excited about it and have never heard of it. I was told that once
> FlexJS is ready to go they’d book me for the next 2 years
> just to convert old Flex apps to FlexJS!
>
> I mean it would already be helpful if people already using FlexJS to
> copy/paste components out of their existing code and adding them to this
> list.
>
> -Christian
>
>
>
> > On 12/1/16, 8:49 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:
> >
> >> I've been thinking about the complaints I’ve read on this list about the
> >> missing documentation for FlexJS and I’d like to do something to help
> >> out. I’ve used AS3/Flex for many years, and I’m now trying to get a hang
> >> of FlexJS.
> >>
> >> So I thought it might be a good starting point for FlexJS newbies (like
> >> me) to have snippets for most or all components that FlexJS has to
> offer,
> >> and make them useable in Josh’s NextGenAS VSCode extension.
> >>
> >> I’d be happy to create the snippets, but I would need someone
> experienced
> >> to write a list of FlexJS components as a starting point.
> >>
> >> The list would have to be in MXML format and the components could have
> >> multiple lines, include beads and strands, and useful/common properties
> >> and styles like x, y, width, height, color, fontsize, paddings,
> >> alignments, etc.  Something like this:
> >>
> >> <s:VGroup id="vg" x="10" y="20" gap="10"
> >>   paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"
> >>   horizontalAlign="left" verticalAlign="top" ....... />
> >>
> >> <s:Label id="lbl" color=“0xff0000” fontSize=“20” fontWeight=“bold”
> >> fontStyle=“italic" textAlign=“center” text=“some text" ........ />
> >>
> >>
> >> IMO, that would go a long way to make up for the missing docs and allow
> >> newbies to get started much faster.
> >>
> >> Anyone?
> >>
> >> -Christian
> >>
> >
>
>

Re: Snippets for FlexJS

Posted by Christian Gotschim <mi...@vulcansoft.com>.
Hi Alex,

> Thanks for offering to help.  We could use all the help we can get.
> 
> I don't know what your areas of expertise are and how much time you have,
> and I don't quite know how you want to organize the list, but you might be
> able to write code to build out the list of components.

My expertise is in AS3 and Flex 4.6 with PHP and MySQL on the backend.
I just recently tried FlexJS with the NextGenAS VSCode extension and
it was tough to say the least! That’s how I came up with the idea of
using snippets to get people start using FlexJS without giving up
shortly after.

Organizing the list: I would have to see what’s even in FlexJS, but basically
having a prefix (like ‘ng’ (for NextGen)) and then the components
classname. That way one could instantly see a list of all ng???
components to use. So typing ngLabel will list the snippet and insert all
the relevant properties/styles to tab through — better more than less
and then just delete the ones not needed. I think that’s easier than
looking around for a property/style that one doesn’t know about or
if they’re relevant.

Time: well, not enough like all of us ;)  But enough to get this done
as proposed (list of components to snippets). I cannot write any
documentation on FlexJS since I don’t know much about it at all yet.


> If you know Java, you could write a custom ASDoc emitter.  I've written
> one that outputs ASDoc information in JSON format.  Or you could write a
> Flex or FlexJS app to read the JSON files and generate the MXML you want.

I don’t know Java. I’d have to see the JSON file first to see if I can get
the necessary info out of that. Can you send it to me?


> One thing to keep in mind is that styles work a bit differently in FlexJS
> than in Flex.  FlexJS currently doesn't document style properties because
> on the JS-side the components are pretty much going to respond to every
> CSS style that the browser knows about.  I suppose we could document which
> of those styles are currently implemented for SWF, but I haven't heard too
> many folks ask for that.

I’ve been following this list for months and I get the feeling that people are
really interested in FlexJS, but only a few know how to even get started with
a basic app. Hence the idea that snippets (with input from the FlexJS
developers themselves) in VSCode (while not replacing 
documantation) would at least allow people to get started faster. I’ve
struggled with just finding a way to color the text of a label or if I’m even
using the right label component (I think I had 3 listed in auto-completion).
That’s very frustrating for someone who’s just writing a large
Flex 4.6 app alone.

Now if a snippet puts the code right there infront of me then I can see
what properties/styles are relevant right away and even tab through them. 
I know there’s been talk of a wiki page and that would be great, but 
snippets would be more of a hands-on approach. And I think with 
Josh’s VSCode extension there’s a really good combination to get 
FlexJS out of the cellar (no pun intended) and into the hands of 
developers and companies.
I recently had an interview for a contract and I told them about FlexJS. They
were very excited about it and have never heard of it. I was told that once 
FlexJS is ready to go they’d book me for the next 2 years
just to convert old Flex apps to FlexJS!

I mean it would already be helpful if people already using FlexJS to
copy/paste components out of their existing code and adding them to this
list.

-Christian



> On 12/1/16, 8:49 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:
> 
>> I've been thinking about the complaints I’ve read on this list about the
>> missing documentation for FlexJS and I’d like to do something to help
>> out. I’ve used AS3/Flex for many years, and I’m now trying to get a hang
>> of FlexJS.
>> 
>> So I thought it might be a good starting point for FlexJS newbies (like
>> me) to have snippets for most or all components that FlexJS has to offer,
>> and make them useable in Josh’s NextGenAS VSCode extension.
>> 
>> I’d be happy to create the snippets, but I would need someone experienced
>> to write a list of FlexJS components as a starting point.
>> 
>> The list would have to be in MXML format and the components could have
>> multiple lines, include beads and strands, and useful/common properties
>> and styles like x, y, width, height, color, fontsize, paddings,
>> alignments, etc.  Something like this:
>> 
>> <s:VGroup id="vg" x="10" y="20" gap="10"
>>   paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"
>>   horizontalAlign="left" verticalAlign="top" ....... />
>> 
>> <s:Label id="lbl" color=“0xff0000” fontSize=“20” fontWeight=“bold”
>> fontStyle=“italic" textAlign=“center” text=“some text" ........ />
>> 
>> 
>> IMO, that would go a long way to make up for the missing docs and allow
>> newbies to get started much faster.
>> 
>> Anyone?
>> 
>> -Christian
>> 
> 


Re: Snippets for FlexJS

Posted by Alex Harui <ah...@adobe.com>.
Hi Christian,

Thanks for offering to help.  We could use all the help we can get.

I don't know what your areas of expertise are and how much time you have,
and I don't quite know how you want to organize the list, but you might be
able to write code to build out the list of components.

If you know Java, you could write a custom ASDoc emitter.  I've written
one that outputs ASDoc information in JSON format.  Or you could write a
Flex or FlexJS app to read the JSON files and generate the MXML you want.

One thing to keep in mind is that styles work a bit differently in FlexJS
than in Flex.  FlexJS currently doesn't document style properties because
on the JS-side the components are pretty much going to respond to every
CSS style that the browser knows about.  I suppose we could document which
of those styles are currently implemented for SWF, but I haven't heard too
many folks ask for that.

Looking forward to your contributions,
-Alex

On 12/1/16, 8:49 PM, "Christian Gotschim" <mi...@vulcansoft.com> wrote:

>I've been thinking about the complaints I’ve read on this list about the
>missing documentation for FlexJS and I’d like to do something to help
>out. I’ve used AS3/Flex for many years, and I’m now trying to get a hang
>of FlexJS.
>
>So I thought it might be a good starting point for FlexJS newbies (like
>me) to have snippets for most or all components that FlexJS has to offer,
>and make them useable in Josh’s NextGenAS VSCode extension.
>
>I’d be happy to create the snippets, but I would need someone experienced
>to write a list of FlexJS components as a starting point.
>
>The list would have to be in MXML format and the components could have
>multiple lines, include beads and strands, and useful/common properties
>and styles like x, y, width, height, color, fontsize, paddings,
>alignments, etc.  Something like this:
>
><s:VGroup id="vg" x="10" y="20" gap="10"
>    paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"
>    horizontalAlign="left" verticalAlign="top" ....... />
>
><s:Label id="lbl" color=“0xff0000” fontSize=“20” fontWeight=“bold”
>fontStyle=“italic" textAlign=“center” text=“some text" ........ />
>
>
>IMO, that would go a long way to make up for the missing docs and allow
>newbies to get started much faster.
>
>Anyone?
>
>-Christian
>