Re: Introducing asformat

2021-09-22 Thread Harbs
Totally agree! B-)

> On Sep 22, 2021, at 8:54 PM, Andrew Wetmore  wrote:
> 
> totally cool.
> 
> On Wed, Sep 22, 2021 at 2:43 PM Josh Tynjala  > wrote:
> Hey everyone,
> 
> I recently created asformat, which is a formatter for ActionScript code. It 
> is based on the Royale compiler's lexer that creates a stream of tokens. One 
> nice thing about working with the token stream versus a full AST (Abstract 
> Syntax Tree) is that it's easier to keep track of existing whitespace to 
> preserve it where appropriate.
> 
> In addition to command line usage, this formatter is intended to eventually 
> be used by IDEs/editors, such as VSCode and Moonshine.
> 
> You can find asformat in nightly builds for now. I'm still testing it with 
> existing codebases, but I wanted to share my progress so that others could 
> check it out, if interested.
> 
> Usage:
> 
> Format a file, and write it back to the file system:
> 
> asformat --write-files src/com/example/MyClass.as
> 
> Alternatively, format all .as files in a directory:
> 
> asformat --write-files src
> 
> Options:
> 
> --write-files: Writes the formatting changes back to the original files. If a 
> file has no formatting changes, it will not be modified. Alias: -w. Default: 
> false.
> 
> --list-files: Lists the files that have been changed by formatting. If a file 
> has no formatting changes, it won't be listed. Alias: -l. Default: false.
> 
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> 
> --tab-width: The width of tabs when insert-spaces is specified. (Default: 4)
> 
> --insert-final-new-line: Adds a final empty line at the end of the file, if 
> one doesn't exist already. (Default: false)
> 
> --open-brace-new-line: Controls whether an opening curly brace is placed on a 
> new line, or is "cuddled" on the current line. (Default: true)
> 
> --insert-space-for-loop-semicolon: Controls whether a space is inserted after 
> the semicolons in a for() loop. (Default: true)
> 
> --insert-space-control-flow-keywords: Controls whether a space is inserted 
> between control flow keywords (like if, for, while) and the following ( open 
> parenthesis. (Default: true)
> 
> --insert-space-anonymous-function-keyword: Controls whether a space is 
> inserted between the function keyword and the following ( open parenthesis, 
> if the function is anonymous (if it doesn't have a name). (Default: false)
> 
> --insert-space-binary-operators: Controls whether a space is inserted before 
> and after binary operators (like +, -, *, /, &&, ||, etc.) (Default: true)
> 
> --insert-space-comma-delimiter: Controls whether a space is inserted after 
> comma delimiters in Object and Array literals. (Default: true)
> 
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so that 
> the opening and closing curly brace are both on the same line or not. 
> (Default: false)
> 
> --max-preserve-new-lines: Specify the maximum number of new line characters 
> that are allowed to appear consecutively. (Default: 2)
> 
> --semicolons: Controls how semicolons are handled. Valid values are insert, 
> remove, and ignore. Insert means that missing semicolons are inserted. Remove 
> means that all semicolons are removed, and ignore means that there is no 
> change to semicolons in the file. (Default: insert)
> 
> Additional notes:
> 
> If neither --write-files nor --list-files is specified, the formatted source 
> code is written to standard output instead.
> 
> If no files are specified, asformat waits for standard input instead.
> 
> --
> Josh Tynjala
> Bowler Hat LLC 
> 
> 
> -- 
> Andrew Wetmore
> 
> http://cottage14.blogspot.com/ 
> 
> 
> 
> 



Re: Introducing asformat

2021-09-22 Thread Andrew Wetmore
totally cool.

On Wed, Sep 22, 2021 at 2:43 PM Josh Tynjala 
wrote:

> Hey everyone,
>
> I recently created asformat, which is a formatter for ActionScript code.
> It is based on the Royale compiler's lexer that creates a stream of tokens.
> One nice thing about working with the token stream versus a full AST
> (Abstract Syntax Tree) is that it's easier to keep track of existing
> whitespace to preserve it where appropriate.
>
> In addition to command line usage, this formatter is intended to
> eventually be used by IDEs/editors, such as VSCode and Moonshine.
>
> You can find asformat in nightly builds for now. I'm still testing it with
> existing codebases, but I wanted to share my progress so that others could
> check it out, if interested.
>
> Usage:
>
> Format a file, and write it back to the file system:
>
> asformat --write-files src/com/example/MyClass.as
>
> Alternatively, format all .as files in a directory:
>
> asformat --write-files src
>
> Options:
>
> --write-files: Writes the formatting changes back to the original files.
> If a file has no formatting changes, it will not be modified. Alias: -w.
> Default: false.
>
> --list-files: Lists the files that have been changed by formatting. If a
> file has no formatting changes, it won't be listed. Alias: -l. Default:
> false.
>
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
>
> --tab-width: The width of tabs when insert-spaces is specified. (Default:
> 4)
>
> --insert-final-new-line: Adds a final empty line at the end of the file,
> if one doesn't exist already. (Default: false)
>
> --open-brace-new-line: Controls whether an opening curly brace is placed
> on a new line, or is "cuddled" on the current line. (Default: true)
>
> --insert-space-for-loop-semicolon: Controls whether a space is inserted
> after the semicolons in a for() loop. (Default: true)
>
> --insert-space-control-flow-keywords: Controls whether a space is inserted
> between control flow keywords (like if, for, while) and the following (
> open parenthesis. (Default: true)
>
> --insert-space-anonymous-function-keyword: Controls whether a space is
> inserted between the function keyword and the following ( open parenthesis,
> if the function is anonymous (if it doesn't have a name). (Default: false)
>
> --insert-space-binary-operators: Controls whether a space is inserted
> before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
> true)
>
> --insert-space-comma-delimiter: Controls whether a space is inserted after
> comma delimiters in Object and Array literals. (Default: true)
>
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so
> that the opening and closing curly brace are both on the same line or not.
>  (Default: false)
>
> --max-preserve-new-lines: Specify the maximum number of new line
> characters that are allowed to appear consecutively. (Default: 2)
>
> --semicolons: Controls how semicolons are handled. Valid values are
> insert, remove, and ignore. Insert means that missing semicolons are
> inserted. Remove means that all semicolons are removed, and ignore means
> that there is no change to semicolons in the file. (Default: insert)
>
> Additional notes:
>
> If neither --write-files nor --list-files is specified, the formatted
> source code is written to standard output instead.
>
> If no files are specified, asformat waits for standard input instead.
>
> --
> Josh Tynjala
> Bowler Hat LLC 
>


-- 
Andrew Wetmore

http://cottage14.blogspot.com/


Introducing asformat

2021-09-22 Thread Josh Tynjala
Hey everyone,

I recently created asformat, which is a formatter for ActionScript code. It
is based on the Royale compiler's lexer that creates a stream of tokens.
One nice thing about working with the token stream versus a full AST
(Abstract Syntax Tree) is that it's easier to keep track of existing
whitespace to preserve it where appropriate.

In addition to command line usage, this formatter is intended to eventually
be used by IDEs/editors, such as VSCode and Moonshine.

You can find asformat in nightly builds for now. I'm still testing it with
existing codebases, but I wanted to share my progress so that others could
check it out, if interested.

Usage:

Format a file, and write it back to the file system:

asformat --write-files src/com/example/MyClass.as

Alternatively, format all .as files in a directory:

asformat --write-files src

Options:

--write-files: Writes the formatting changes back to the original files. If
a file has no formatting changes, it will not be modified. Alias: -w.
Default: false.

--list-files: Lists the files that have been changed by formatting. If a
file has no formatting changes, it won't be listed. Alias: -l. Default:
false.

--insert-spaces: Indents with spaces instead of tabs. (Default: false)

--tab-width: The width of tabs when insert-spaces is specified. (Default: 4)

--insert-final-new-line: Adds a final empty line at the end of the file, if
one doesn't exist already. (Default: false)

--open-brace-new-line: Controls whether an opening curly brace is placed on
a new line, or is "cuddled" on the current line. (Default: true)

--insert-space-for-loop-semicolon: Controls whether a space is inserted
after the semicolons in a for() loop. (Default: true)

--insert-space-control-flow-keywords: Controls whether a space is inserted
between control flow keywords (like if, for, while) and the following (
open parenthesis. (Default: true)

--insert-space-anonymous-function-keyword: Controls whether a space is
inserted between the function keyword and the following ( open parenthesis,
if the function is anonymous (if it doesn't have a name). (Default: false)

--insert-space-binary-operators: Controls whether a space is inserted
before and after binary operators (like +, -, *, /, &&, ||, etc.) (Default:
true)

--insert-space-comma-delimiter: Controls whether a space is inserted after
comma delimiters in Object and Array literals. (Default: true)

--collapse-empty-blocks: Controls whether empty blocks are collapsed so
that the opening and closing curly brace are both on the same line or
not. (Default:
false)

--max-preserve-new-lines: Specify the maximum number of new line characters
that are allowed to appear consecutively. (Default: 2)

--semicolons: Controls how semicolons are handled. Valid values are insert,
remove, and ignore. Insert means that missing semicolons are inserted.
Remove means that all semicolons are removed, and ignore means that there
is no change to semicolons in the file. (Default: insert)

Additional notes:

If neither --write-files nor --list-files is specified, the formatted
source code is written to standard output instead.

If no files are specified, asformat waits for standard input instead.

--
Josh Tynjala
Bowler Hat LLC 


Re: crux not invoking event handler method

2021-09-22 Thread Roman Isitua
I am using maven for dependency management. I created a multi module maven
project with a client side and server side.
The client side is apache royale project that was created using the
following archetype

mvn archetype:generate   -DgroupId="com.spacio.fm.client3"
-DartifactId="FmClient3"
-DarchetypeGroupId="org.apache.royale.framework"
-DarchetypeArtifactId="royale-simple-application-archetype"
-DarchetypeVersion="0.9.7"   -DinteractiveMode=false

After adding crux dependencies and creating the relevant configurations
e.g. Beans.xml

I compile using "mvn clean install" this compiles the project to the target
folder.

The server is a spring based project that uses spring boot and blazeds.
I added a mvn script to copy the compiled client side project to the server
project so I can run it the spring boot way

mvn spring-boot:run


Find attached the asconfig.json and client side pom. Everything else
appears to work fine except the event handler method not being invoked.

Even the type safety check that is done on the event handler works. i.e. if
I misspell the event handler class name. I get a crux related error at run
time.



On Wed, Sep 22, 2021 at 2:07 PM Maria Jose Esteve  wrote:

> Roman,
>
> How do you compile ? asconfigc, mvn, …? Can you send pom.xml,
> asconfig.json, ...?
>
>
>
> Thx
>
> *De:* Roman Isitua 
> *Enviado el:* miércoles, 22 de septiembre de 2021 11:47
> *Para:* users@royale.apache.org
> *Asunto:* crux not invoking event handler method
>
>
>
> Hi Everyone,
>
>
>
> I created a new royale project on version 0.9.7. I am able to inject
> models into view. I have created my first custom event with its
> corresponding
> event handler method in the controller.
> When I dispatch the event crux does not invoke my event handler method
>
> What is frustrating is the fact that there is nothing displayed in the log.
>
> No error messages. The event handler method is not being invoked.
>
>
>
> I have attached my program source code. I have looked at the royal crux
> examples over and over. I can't seem to see the difference between the
> example code and mine.
>
>
>
>
>
> Regards,.
>
>
>
>
>
> Regards,
>
>

http://maven.apache.org/POM/4.0.0; xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance; xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd;>
4.0.0

com.spacio.fm
SpacioFM
1.0

com.spacio.fm.client3
FmClient3
pom


UTF-8
1.8
1.8
0.9.7   
 

 

   
 
   com.spacio
   spacio_as3
   1.0
   swc
   js   
 
 
   org.apache.royale.framework
   Jewel
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Icons
   ${royale.framework.version}
   swc
   js
 

 
   org.apache.royale.framework
   JewelTheme
   ${royale.framework.version}
   swc
   theme
   js
 
 
 
   org.apache.royale.framework
   Core
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Basic
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Language
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Crux
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   HTML
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Collections
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Binding
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Graphics
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Network
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   Reflection
   ${royale.framework.version}
   swc
   js
 
 
   org.apache.royale.framework
   MXRoyale
   ${royale.framework.version}
   swc
   js
 
 
   

  
   MainApp
  


http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd; xmlns="http://maven.apache.org/POM/4.0.0;
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance;>
  

RE: Moonshine SDK Installer 4.0.0 released

2021-09-22 Thread Maria Jose Esteve
Hello Piotr, I'm sorry I didn't answer you, forgive me.

Yes, I still can't download.
I do not know the process that is used but I understand that it will connect to 
a repository and the last day I stayed at this point, looking at the path of 
the repositories that you are trying to access.
Tonight I will try to continue the test.

Thanks for your interest.

Hiedra.

De: Piotr Zarzycki 
Enviado el: miércoles, 22 de septiembre de 2021 12:26
Para: users@royale.apache.org
Asunto: Re: Moonshine SDK Installer 4.0.0 released

Maria,

Do you still have problems with downloading SDK trough Moonshine SDK Installer ?

śr., 15 wrz 2021 o 18:36 Piotr Zarzycki 
mailto:piotrzarzyck...@gmail.com>> napisał(a):
Hi Maria,

We can make a short call when you will be available and you could show me. 
Please try uninstall Moonshine SDK Installer and install fresh one. Make sure 
that your antivirus won't block anything.

śr., 15 wrz 2021 o 14:05 Piotr Zarzycki 
mailto:piotrzarzyck...@gmail.com>> napisał(a):
We have just tested on Windows and everything works just fine. I'm not sure 
what could be wrong on your sight.

śr., 15 wrz 2021 o 12:32 Maria Jose Esteve 
mailto:mjest...@iest.com>> napisał(a):
It has not worked, same message ☹

Hiedra

De: Piotr Zarzycki mailto:piotrzarzyck...@gmail.com>>
Enviado el: miércoles, 15 de septiembre de 2021 11:19
Para: users@royale.apache.org
Asunto: Re: Moonshine SDK Installer 4.0.0 released

Try to uninstall previous version of installer. I have just tried 0.9.9 Nightly 
on my Mac and everything went smoothly. Maybe something blocking downloading.

śr., 15 wrz 2021 o 11:12 Piotr Zarzycki 
mailto:piotrzarzyck...@gmail.com>> napisał(a):
Last question - Are you on Windows or Mac ?

śr., 15 wrz 2021 o 10:51 Maria Jose Esteve 
mailto:mjest...@iest.com>> napisał(a):
I have tried to download 0.9.8 and 0.9.9 and the result is the same, I can't 
really download "nothing" so I was wondering if I needed to configure any url 
or something like that.

I had the previous "Moonshine SDK Installer" installed and I have not 
uninstalled it before installing the new version, could it be because of this?
Hiedra

De: Piotr Zarzycki mailto:piotrzarzyck...@gmail.com>>
Enviado el: miércoles, 15 de septiembre de 2021 10:18
Para: users@royale.apache.org
Asunto: Re: Moonshine SDK Installer 4.0.0 released

Hi Maria,

What version of Apache Royale did you try to download ?

Thanks,
Piotr

śr., 15 wrz 2021 o 10:13 Maria Jose Esteve 
mailto:mjest...@iest.com>> napisał(a):
Hi Piotr, I have installed the new Moonshine SDK Installer but when I try to 
download any of the SDK's, it gives me an error and I don't know why:

“Oops! Apache Royale download is currently unavailable!
Please, contact the administrator, or try again later.”

Do I have to configure something?

Thx
Hiedra.


De: Piotr Zarzycki mailto:piotrzarzyck...@gmail.com>>
Enviado el: martes, 14 de septiembre de 2021 11:31
Para: users@royale.apache.org
Asunto: Moonshine SDK Installer 4.0.0 released

Hello Royale Community,

We are pleased to announce that Moonshine SDK Installer 4.0.0 has been released.
This release provides ability to download binary distribution of newly released 
Apache Royale 0.9.8. Nightly build of Royale was updated to 0.9.9.

More information in our release notes: 
https://github.com/Moonshine-IDE/Moonshine-SDK-Installer/blob/master/CHANGELOG.md#moonshine-sdk-installer-400

SDK Installer can be used trough Moonshine using menu Help -> Gettings Started 
-> Download Third Party Software

You can also download installer as a standalone application here: 
https://moonshine-ide.com/download-sdk-installer/

Thanks,
--

Piotr Zarzycki


--

Piotr Zarzycki


--

Piotr Zarzycki


--

Piotr Zarzycki


--

Piotr Zarzycki


--

Piotr Zarzycki


--

Piotr Zarzycki


RE: crux not invoking event handler method

2021-09-22 Thread Maria Jose Esteve
Roman,
How do you compile ? asconfigc, mvn, …? Can you send pom.xml, asconfig.json, 
...?

Thx
De: Roman Isitua 
Enviado el: miércoles, 22 de septiembre de 2021 11:47
Para: users@royale.apache.org
Asunto: crux not invoking event handler method

Hi Everyone,

I created a new royale project on version 0.9.7. I am able to inject models 
into view. I have created my first custom event with its corresponding
event handler method in the controller.
When I dispatch the event crux does not invoke my event handler method

What is frustrating is the fact that there is nothing displayed in the log.
No error messages. The event handler method is not being invoked.

I have attached my program source code. I have looked at the royal crux 
examples over and over. I can't seem to see the difference between the example 
code and mine.


Regards,.


Regards,



Re: Moonshine SDK Installer 4.0.0 released

2021-09-22 Thread Piotr Zarzycki
Maria,

Do you still have problems with downloading SDK trough Moonshine SDK
Installer ?

śr., 15 wrz 2021 o 18:36 Piotr Zarzycki 
napisał(a):

> Hi Maria,
>
> We can make a short call when you will be available and you could show me.
> Please try uninstall Moonshine SDK Installer and install fresh one. Make
> sure that your antivirus won't block anything.
>
> śr., 15 wrz 2021 o 14:05 Piotr Zarzycki 
> napisał(a):
>
>> We have just tested on Windows and everything works just fine. I'm not
>> sure what could be wrong on your sight.
>>
>> śr., 15 wrz 2021 o 12:32 Maria Jose Esteve 
>> napisał(a):
>>
>>> It has not worked, same message ☹
>>>
>>>
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Piotr Zarzycki 
>>> *Enviado el:* miércoles, 15 de septiembre de 2021 11:19
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Moonshine SDK Installer 4.0.0 released
>>>
>>>
>>>
>>> Try to uninstall previous version of installer. I have just tried 0.9.9
>>> Nightly on my Mac and everything went smoothly. Maybe something blocking
>>> downloading.
>>>
>>>
>>>
>>> śr., 15 wrz 2021 o 11:12 Piotr Zarzycki 
>>> napisał(a):
>>>
>>> Last question - Are you on Windows or Mac ?
>>>
>>>
>>>
>>> śr., 15 wrz 2021 o 10:51 Maria Jose Esteve 
>>> napisał(a):
>>>
>>> I have tried to download 0.9.8 and 0.9.9 and the result is the same, I
>>> can't really download "nothing" so I was wondering if I needed to configure
>>> any url or something like that.
>>>
>>>
>>>
>>> I had the previous "Moonshine SDK Installer" installed and I have not
>>> uninstalled it before installing the new version, could it be because of
>>> this?
>>>
>>> Hiedra
>>>
>>>
>>>
>>> *De:* Piotr Zarzycki 
>>> *Enviado el:* miércoles, 15 de septiembre de 2021 10:18
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Re: Moonshine SDK Installer 4.0.0 released
>>>
>>>
>>>
>>> Hi Maria,
>>>
>>>
>>>
>>> What version of Apache Royale did you try to download ?
>>>
>>>
>>>
>>> Thanks,
>>>
>>> Piotr
>>>
>>>
>>>
>>> śr., 15 wrz 2021 o 10:13 Maria Jose Esteve 
>>> napisał(a):
>>>
>>> Hi Piotr, I have installed the new Moonshine SDK Installer but when I
>>> try to download any of the SDK's, it gives me an error and I don't know why:
>>>
>>>
>>>
>>> “Oops! Apache Royale download is currently unavailable!
>>>
>>> Please, contact the administrator, or try again later.”
>>>
>>>
>>>
>>> Do I have to configure something?
>>>
>>>
>>>
>>> Thx
>>>
>>> Hiedra.
>>>
>>>
>>>
>>>
>>>
>>> *De:* Piotr Zarzycki 
>>> *Enviado el:* martes, 14 de septiembre de 2021 11:31
>>> *Para:* users@royale.apache.org
>>> *Asunto:* Moonshine SDK Installer 4.0.0 released
>>>
>>>
>>>
>>> Hello Royale Community,
>>>
>>>
>>>
>>> We are pleased to announce that Moonshine SDK Installer 4.0.0 has been
>>> released.
>>>
>>> This release provides ability to download binary distribution of newly
>>> released Apache Royale 0.9.8. Nightly build of Royale was updated to 0.9.9.
>>>
>>>
>>>
>>> More information in our release notes:
>>> https://github.com/Moonshine-IDE/Moonshine-SDK-Installer/blob/master/CHANGELOG.md#moonshine-sdk-installer-400
>>>
>>>
>>>
>>> SDK Installer can be used trough Moonshine using menu Help -> Gettings
>>> Started -> Download Third Party Software
>>>
>>>
>>>
>>> You can also download installer as a standalone application here:
>>> https://moonshine-ide.com/download-sdk-installer/
>>>
>>>
>>>
>>> Thanks,
>>>
>>> --
>>>
>>> *Piotr Zarzycki *
>>>
>>>
>>>
>>>
>>> --
>>>
>>> *Piotr Zarzycki *
>>>
>>>
>>>
>>>
>>> --
>>>
>>> *Piotr Zarzycki *
>>>
>>>
>>>
>>>
>>> --
>>>
>>> *Piotr Zarzycki *
>>>
>>
>>
>> --
>>
>> Piotr Zarzycki
>>
>
>
> --
>
> Piotr Zarzycki
>


-- 

Piotr Zarzycki


crux not invoking event handler method

2021-09-22 Thread Roman Isitua
Hi Everyone,

I created a new royale project on version 0.9.7. I am able to inject models
into view. I have created my first custom event with its corresponding
event handler method in the controller.
When I dispatch the event crux does not invoke my event handler method

What is frustrating is the fact that there is nothing displayed in the log.
No error messages. The event handler method is not being invoked.

I have attached my program source code. I have looked at the royal crux
examples over and over. I can't seem to see the difference between the
example code and mine.


Regards,.


Regards,


App.mxml
Description: Binary data


Beans.mxml
Description: Binary data


LovController.as
Description: Binary data


RegisterFMController.as
Description: Binary data


FmSignUpEvent.as
Description: Binary data


LogInEvent.as
Description: Binary data


FmSignUpDTO.as
Description: Binary data


LogInDTO.as
Description: Binary data


FmService.as
Description: Binary data


LovBO.as
Description: Binary data


Main.mxml
Description: Binary data


MainBean.as
Description: Binary data


SelectEstateDialog.mxml
Description: Binary data