Re: Snippets for FlexJS

2016-12-05 Thread Christian Gotschim
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:















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  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"  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  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  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  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  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"  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  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

2016-12-02 Thread Christian Gotschim

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 <aha...@adobe.com> wrote:
> 
> 
> 
> On 12/2/16, 2:14 PM, "Christian Gotschim" <m...@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

2016-12-02 Thread Christian Gotschim
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 <aha...@adobe.com> wrote:
> 
> 
> 
> On 12/1/16, 10:41 PM, "Christian Gotschim" <m...@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

2016-12-01 Thread Christian Gotschim
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" <m...@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:
>> 
>> >   paddingLeft="0" paddingRight="0" paddingTop="0" paddingBottom="0"
>>   horizontalAlign="left" verticalAlign="top" ... />
>> 
>> > 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
>> 
> 



Snippets for FlexJS

2016-12-01 Thread Christian Gotschim
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:






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

Anyone?

-Christian