You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@royale.apache.org by Hugo Ferreira <hf...@gmail.com> on 2022/05/20 22:00:50 UTC

Royale libraries with JS only

Hi,

I was surprised today that I found that I can compile a library (SWC-JS)
with the pure JS version of the framework.
I thought that I needed the SWF+JS version to be able to do that.
That's a great surprise and usefull to split and reuse comum parts of the
code.

Since a SWC it's a zip file, what's thw reason to use the library.swf
inside of the file ?
I guess that the catalog.xml it's used by IDE (on my case VS Code) ?

Why not call the file something different like JSL (Java Script Library) or
ARL (Apache Royale Library) ?

I see that I can easly debug the library with VS Code (that it's expanded
on the application project) but I'm debuging you JS only that's not bad but
would be great if we can debug the AS3/MXML files => Perhaps a new
asconfig.json variable to build with the necessary metadata as source files
to debug.

Regards,
Hugo.

RE: Royale libraries with JS only

Posted by Maria Jose Esteve <mj...@iest.com>.
How do you launch the build?
This would be an example of a build task with asconfigc including the path to the sdk (tasks.json)

    {
        "label": "build with asconfigc",
        "type": "shell",
        "command": "asconfigc",
        "args": [
            "--sdk=${config:as3mxml.sdk.framework}"
        ],
        "presentation": {
            "echo": true,
            "reveal": "always",
            "focus": true,
            "panel": "dedicated"
        },
        "problemMatcher": [
            "$nextgenas_nomatch"
        ],
        "group": "build"
    }

Hiedra

-----Mensaje original-----
De: Maria Jose Esteve <mj...@iest.com> 
Enviado el: sábado, 21 de mayo de 2022 0:12
Para: dev@royale.apache.org
Asunto: RE: Royale libraries with JS only

Hugo,
Can't debug, can you share your asconfig.json?

Do you have debug=true & sourcemap options?

Look, this is the asonfig.json of the example project I have published:

{
    "config": "royale",
    "type": "lib",
    "compilerOptions": {
        "debug": true,
        "targets": ["JSRoyale"],
        "source-path": [
            "src/main/royale",
            "../royale-jscalendar/src/main/royale/"
        ],
        "include-namespaces": [
            "library://ns.apache.org/royale/community"
        ],
        "namespace": [
            {
                "uri": "library://ns.apache.org/royale/community",
                "manifest": "src/main/resources/components-manifest.xml"
            },
            {
                "uri": "library://ns.apache.org/royale/community",
                "manifest": "../royale-jscalendar/src/main/resources/jscalendar-manifest.xml"
            }
        ],
        "include-classes": [
            "ComponentsClasses"
        ],
        "include-sources": [
            "src/main/royale"
        ],
        "library-path": [
            "${royalelib}/libs/MXRoyaleBase.swc"
        ],
        "js-library-path": [
            "${royalelib}/js/libs/MXRoyaleBaseJS.swc"
        ],
        "source-map": true,
        "remove-circulars": true,
        "keep-as3-metadata": [
            "Inject", "Dispatcher", "EventHandler", "PostConstruct", "PreDestroy", "ViewAdded", "ViewRemoved", "Bindable", "Transient"
        ],
        "js-default-initializers": true,
        "output": "target/RoyaleComponentsLib.swc"
    },
    "copySourcePathAssets": true,
    "additionalOptions": [//MXRoyale-${royale.framework.version}-js.swc:defaults.css
        //"-compiler.exclude-defaults-css-files=MXRoyaleJS.swc:defaults.css",
        "-js-dynamic-access-unknown-members=true",
        "-show-binding-warnings=false"
    ]
}

Hiedra

-----Mensaje original-----
De: Hugo Ferreira <hf...@gmail.com> Enviado el: sábado, 21 de mayo de 2022 0:01
Para: Apache Royale Development <de...@royale.apache.org>
Asunto: Royale libraries with JS only

Hi,

I was surprised today that I found that I can compile a library (SWC-JS) with the pure JS version of the framework.
I thought that I needed the SWF+JS version to be able to do that.
That's a great surprise and usefull to split and reuse comum parts of the code.

Since a SWC it's a zip file, what's thw reason to use the library.swf inside of the file ?
I guess that the catalog.xml it's used by IDE (on my case VS Code) ?

Why not call the file something different like JSL (Java Script Library) or ARL (Apache Royale Library) ?

I see that I can easly debug the library with VS Code (that it's expanded on the application project) but I'm debuging you JS only that's not bad but would be great if we can debug the AS3/MXML files => Perhaps a new asconfig.json variable to build with the necessary metadata as source files to debug.

Regards,
Hugo.

Re: Royale libraries with JS only

Posted by Hugo Ferreira <hf...@gmail.com>.
That's make sense, because the IDE know where to grab the original source
code.
I'm splitting now a project and I will test but for your example I'm
confident that will work :)

Maria Jose Esteve <mj...@iest.com> escreveu no dia sexta, 20/05/2022
à(s) 23:50:

> We are missing something because I can...
> Do you have a main project with one asconfig and the library with another
> asconfig?
> In the asconfig of the main project you have to put all the paths where
> the code can be found in the conditional compile option "source-path".
>
> Ex:
>
> {
>     "config": "royale",
>     "compilerOptions": {
>         "debug": true,
>         "targets": ["JSRoyale"],
>         "html-template":
> "src/main/resources/royale-echarts-examples-template.html",
>         "source-path": [
>             "src/main/royale",
>             "../royale-echarts/src/main/royale/" <--- *********** physical
> route to the library ****************
>         ],
>         "namespace": [
>             {
>                 "uri": "library://ns.apache.org/royale/community/echarts",
>                 "manifest":
> "../royale-echarts/src/main/resources/echarts-manifest.xml"
>             }
>         ],
>         "library-path": [
>             "${royalelib}/libs/MXRoyaleBase.swc"
>         ],
>         "js-library-path": [
>             "${royalelib}/js/libs/MXRoyaleBaseJS.swc"
>         ],
>         "define": [
>             {
>                 "name": "BUILD::buildNumber",
>                 "value": "'buildNumber'"
>             },
>             {
>                 "name": "BUILD::buildVersion",
>                 "value": "'project.version'"
>             }
>         ],
>         "source-map": true
>     },
>     "files":
>     [
>         "src/main/royale/App.mxml"
>     ]
> }
>
> Hiedra
>
> -----Mensaje original-----
> De: Hugo Ferreira <hf...@gmail.com>
> Enviado el: sábado, 21 de mayo de 2022 0:27
> Para: Apache Royale Development <de...@royale.apache.org>
> Asunto: Re: Royale libraries with JS only
>
> Yes, I can debug with VS Code, however the library (code in SWC) is open
> in JS files and not the AS source code.
> It's not a huge issue, because the similarities between JS and AS.
>
> Maria Jose Esteve <mj...@iest.com> escreveu no dia sexta, 20/05/2022
> à(s) 23:11:
>
> > Hugo,
> > Can't debug, can you share your asconfig.json?
> >
> > Do you have debug=true & sourcemap options?
> >
> > Look, this is the asonfig.json of the example project I have published:
> >
> > {
> >     "config": "royale",
> >     "type": "lib",
> >     "compilerOptions": {
> >         "debug": true,
> >         "targets": ["JSRoyale"],
> >         "source-path": [
> >             "src/main/royale",
> >             "../royale-jscalendar/src/main/royale/"
> >         ],
> >         "include-namespaces": [
> >             "library://ns.apache.org/royale/community"
> >         ],
> >         "namespace": [
> >             {
> >                 "uri": "library://ns.apache.org/royale/community",
> >                 "manifest": "src/main/resources/components-manifest.xml"
> >             },
> >             {
> >                 "uri": "library://ns.apache.org/royale/community",
> >                 "manifest":
> > "../royale-jscalendar/src/main/resources/jscalendar-manifest.xml"
> >             }
> >         ],
> >         "include-classes": [
> >             "ComponentsClasses"
> >         ],
> >         "include-sources": [
> >             "src/main/royale"
> >         ],
> >         "library-path": [
> >             "${royalelib}/libs/MXRoyaleBase.swc"
> >         ],
> >         "js-library-path": [
> >             "${royalelib}/js/libs/MXRoyaleBaseJS.swc"
> >         ],
> >         "source-map": true,
> >         "remove-circulars": true,
> >         "keep-as3-metadata": [
> >             "Inject", "Dispatcher", "EventHandler", "PostConstruct",
> > "PreDestroy", "ViewAdded", "ViewRemoved", "Bindable", "Transient"
> >         ],
> >         "js-default-initializers": true,
> >         "output": "target/RoyaleComponentsLib.swc"
> >     },
> >     "copySourcePathAssets": true,
> >     "additionalOptions":
> > [//MXRoyale-${royale.framework.version}-js.swc:defaults.css
> >
> > //"-compiler.exclude-defaults-css-files=MXRoyaleJS.swc:defaults.css",
> >         "-js-dynamic-access-unknown-members=true",
> >         "-show-binding-warnings=false"
> >     ]
> > }
> >
> > Hiedra
> >
> > -----Mensaje original-----
> > De: Hugo Ferreira <hf...@gmail.com> Enviado el: sábado, 21 de
> > mayo de 2022 0:01
> > Para: Apache Royale Development <de...@royale.apache.org>
> > Asunto: Royale libraries with JS only
> >
> > Hi,
> >
> > I was surprised today that I found that I can compile a library
> > (SWC-JS) with the pure JS version of the framework.
> > I thought that I needed the SWF+JS version to be able to do that.
> > That's a great surprise and usefull to split and reuse comum parts of
> > the code.
> >
> > Since a SWC it's a zip file, what's thw reason to use the library.swf
> > inside of the file ?
> > I guess that the catalog.xml it's used by IDE (on my case VS Code) ?
> >
> > Why not call the file something different like JSL (Java Script
> > Library) or ARL (Apache Royale Library) ?
> >
> > I see that I can easly debug the library with VS Code (that it's
> > expanded on the application project) but I'm debuging you JS only
> > that's not bad but would be great if we can debug the AS3/MXML files
> > => Perhaps a new asconfig.json variable to build with the necessary
> > metadata as source files to debug.
> >
> > Regards,
> > Hugo.
> >
>

RE: Royale libraries with JS only

Posted by Maria Jose Esteve <mj...@iest.com>.
We are missing something because I can...
Do you have a main project with one asconfig and the library with another asconfig?
In the asconfig of the main project you have to put all the paths where the code can be found in the conditional compile option "source-path".

Ex:

{
    "config": "royale",
    "compilerOptions": {
        "debug": true,
        "targets": ["JSRoyale"],
        "html-template": "src/main/resources/royale-echarts-examples-template.html",
        "source-path": [
            "src/main/royale",
            "../royale-echarts/src/main/royale/" <--- *********** physical route to the library ****************
        ],
        "namespace": [
            {
                "uri": "library://ns.apache.org/royale/community/echarts",
                "manifest": "../royale-echarts/src/main/resources/echarts-manifest.xml"
            }
        ],
        "library-path": [
            "${royalelib}/libs/MXRoyaleBase.swc"
        ],
        "js-library-path": [
            "${royalelib}/js/libs/MXRoyaleBaseJS.swc"
        ],
        "define": [
            {
                "name": "BUILD::buildNumber",
                "value": "'buildNumber'"
            },
            {
                "name": "BUILD::buildVersion",
                "value": "'project.version'"
            }
        ],
        "source-map": true
    },
    "files":
    [
        "src/main/royale/App.mxml"
    ]
}

Hiedra

-----Mensaje original-----
De: Hugo Ferreira <hf...@gmail.com> 
Enviado el: sábado, 21 de mayo de 2022 0:27
Para: Apache Royale Development <de...@royale.apache.org>
Asunto: Re: Royale libraries with JS only

Yes, I can debug with VS Code, however the library (code in SWC) is open in JS files and not the AS source code.
It's not a huge issue, because the similarities between JS and AS.

Maria Jose Esteve <mj...@iest.com> escreveu no dia sexta, 20/05/2022
à(s) 23:11:

> Hugo,
> Can't debug, can you share your asconfig.json?
>
> Do you have debug=true & sourcemap options?
>
> Look, this is the asonfig.json of the example project I have published:
>
> {
>     "config": "royale",
>     "type": "lib",
>     "compilerOptions": {
>         "debug": true,
>         "targets": ["JSRoyale"],
>         "source-path": [
>             "src/main/royale",
>             "../royale-jscalendar/src/main/royale/"
>         ],
>         "include-namespaces": [
>             "library://ns.apache.org/royale/community"
>         ],
>         "namespace": [
>             {
>                 "uri": "library://ns.apache.org/royale/community",
>                 "manifest": "src/main/resources/components-manifest.xml"
>             },
>             {
>                 "uri": "library://ns.apache.org/royale/community",
>                 "manifest":
> "../royale-jscalendar/src/main/resources/jscalendar-manifest.xml"
>             }
>         ],
>         "include-classes": [
>             "ComponentsClasses"
>         ],
>         "include-sources": [
>             "src/main/royale"
>         ],
>         "library-path": [
>             "${royalelib}/libs/MXRoyaleBase.swc"
>         ],
>         "js-library-path": [
>             "${royalelib}/js/libs/MXRoyaleBaseJS.swc"
>         ],
>         "source-map": true,
>         "remove-circulars": true,
>         "keep-as3-metadata": [
>             "Inject", "Dispatcher", "EventHandler", "PostConstruct", 
> "PreDestroy", "ViewAdded", "ViewRemoved", "Bindable", "Transient"
>         ],
>         "js-default-initializers": true,
>         "output": "target/RoyaleComponentsLib.swc"
>     },
>     "copySourcePathAssets": true,
>     "additionalOptions":
> [//MXRoyale-${royale.framework.version}-js.swc:defaults.css
>
> //"-compiler.exclude-defaults-css-files=MXRoyaleJS.swc:defaults.css",
>         "-js-dynamic-access-unknown-members=true",
>         "-show-binding-warnings=false"
>     ]
> }
>
> Hiedra
>
> -----Mensaje original-----
> De: Hugo Ferreira <hf...@gmail.com> Enviado el: sábado, 21 de 
> mayo de 2022 0:01
> Para: Apache Royale Development <de...@royale.apache.org>
> Asunto: Royale libraries with JS only
>
> Hi,
>
> I was surprised today that I found that I can compile a library 
> (SWC-JS) with the pure JS version of the framework.
> I thought that I needed the SWF+JS version to be able to do that.
> That's a great surprise and usefull to split and reuse comum parts of 
> the code.
>
> Since a SWC it's a zip file, what's thw reason to use the library.swf 
> inside of the file ?
> I guess that the catalog.xml it's used by IDE (on my case VS Code) ?
>
> Why not call the file something different like JSL (Java Script 
> Library) or ARL (Apache Royale Library) ?
>
> I see that I can easly debug the library with VS Code (that it's 
> expanded on the application project) but I'm debuging you JS only 
> that's not bad but would be great if we can debug the AS3/MXML files 
> => Perhaps a new asconfig.json variable to build with the necessary 
> metadata as source files to debug.
>
> Regards,
> Hugo.
>

Re: Royale libraries with JS only

Posted by Hugo Ferreira <hf...@gmail.com>.
Yes, I can debug with VS Code, however the library (code in SWC) is open in
JS files and not the AS source code.
It's not a huge issue, because the similarities between JS and AS.

Maria Jose Esteve <mj...@iest.com> escreveu no dia sexta, 20/05/2022
à(s) 23:11:

> Hugo,
> Can't debug, can you share your asconfig.json?
>
> Do you have debug=true & sourcemap options?
>
> Look, this is the asonfig.json of the example project I have published:
>
> {
>     "config": "royale",
>     "type": "lib",
>     "compilerOptions": {
>         "debug": true,
>         "targets": ["JSRoyale"],
>         "source-path": [
>             "src/main/royale",
>             "../royale-jscalendar/src/main/royale/"
>         ],
>         "include-namespaces": [
>             "library://ns.apache.org/royale/community"
>         ],
>         "namespace": [
>             {
>                 "uri": "library://ns.apache.org/royale/community",
>                 "manifest": "src/main/resources/components-manifest.xml"
>             },
>             {
>                 "uri": "library://ns.apache.org/royale/community",
>                 "manifest":
> "../royale-jscalendar/src/main/resources/jscalendar-manifest.xml"
>             }
>         ],
>         "include-classes": [
>             "ComponentsClasses"
>         ],
>         "include-sources": [
>             "src/main/royale"
>         ],
>         "library-path": [
>             "${royalelib}/libs/MXRoyaleBase.swc"
>         ],
>         "js-library-path": [
>             "${royalelib}/js/libs/MXRoyaleBaseJS.swc"
>         ],
>         "source-map": true,
>         "remove-circulars": true,
>         "keep-as3-metadata": [
>             "Inject", "Dispatcher", "EventHandler", "PostConstruct",
> "PreDestroy", "ViewAdded", "ViewRemoved", "Bindable", "Transient"
>         ],
>         "js-default-initializers": true,
>         "output": "target/RoyaleComponentsLib.swc"
>     },
>     "copySourcePathAssets": true,
>     "additionalOptions":
> [//MXRoyale-${royale.framework.version}-js.swc:defaults.css
>
> //"-compiler.exclude-defaults-css-files=MXRoyaleJS.swc:defaults.css",
>         "-js-dynamic-access-unknown-members=true",
>         "-show-binding-warnings=false"
>     ]
> }
>
> Hiedra
>
> -----Mensaje original-----
> De: Hugo Ferreira <hf...@gmail.com>
> Enviado el: sábado, 21 de mayo de 2022 0:01
> Para: Apache Royale Development <de...@royale.apache.org>
> Asunto: Royale libraries with JS only
>
> Hi,
>
> I was surprised today that I found that I can compile a library (SWC-JS)
> with the pure JS version of the framework.
> I thought that I needed the SWF+JS version to be able to do that.
> That's a great surprise and usefull to split and reuse comum parts of the
> code.
>
> Since a SWC it's a zip file, what's thw reason to use the library.swf
> inside of the file ?
> I guess that the catalog.xml it's used by IDE (on my case VS Code) ?
>
> Why not call the file something different like JSL (Java Script Library)
> or ARL (Apache Royale Library) ?
>
> I see that I can easly debug the library with VS Code (that it's expanded
> on the application project) but I'm debuging you JS only that's not bad but
> would be great if we can debug the AS3/MXML files => Perhaps a new
> asconfig.json variable to build with the necessary metadata as source files
> to debug.
>
> Regards,
> Hugo.
>

RE: Royale libraries with JS only

Posted by Maria Jose Esteve <mj...@iest.com>.
Hugo, 
Can't debug, can you share your asconfig.json?

Do you have debug=true & sourcemap options?

Look, this is the asonfig.json of the example project I have published:

{
    "config": "royale",
    "type": "lib",
    "compilerOptions": {
        "debug": true,
        "targets": ["JSRoyale"],
        "source-path": [
            "src/main/royale",
            "../royale-jscalendar/src/main/royale/"
        ],
        "include-namespaces": [
            "library://ns.apache.org/royale/community"
        ],
        "namespace": [
            {
                "uri": "library://ns.apache.org/royale/community",
                "manifest": "src/main/resources/components-manifest.xml"
            },
            {
                "uri": "library://ns.apache.org/royale/community",
                "manifest": "../royale-jscalendar/src/main/resources/jscalendar-manifest.xml"
            }
        ],
        "include-classes": [
            "ComponentsClasses"
        ],
        "include-sources": [
            "src/main/royale"
        ],
        "library-path": [
            "${royalelib}/libs/MXRoyaleBase.swc"
        ],
        "js-library-path": [
            "${royalelib}/js/libs/MXRoyaleBaseJS.swc"
        ],
        "source-map": true,
        "remove-circulars": true,
        "keep-as3-metadata": [
            "Inject", "Dispatcher", "EventHandler", "PostConstruct", "PreDestroy", "ViewAdded", "ViewRemoved", "Bindable", "Transient"
        ],
        "js-default-initializers": true,
        "output": "target/RoyaleComponentsLib.swc"
    },
    "copySourcePathAssets": true,
    "additionalOptions": [//MXRoyale-${royale.framework.version}-js.swc:defaults.css
        //"-compiler.exclude-defaults-css-files=MXRoyaleJS.swc:defaults.css",
        "-js-dynamic-access-unknown-members=true",
        "-show-binding-warnings=false"
    ]
}

Hiedra

-----Mensaje original-----
De: Hugo Ferreira <hf...@gmail.com> 
Enviado el: sábado, 21 de mayo de 2022 0:01
Para: Apache Royale Development <de...@royale.apache.org>
Asunto: Royale libraries with JS only

Hi,

I was surprised today that I found that I can compile a library (SWC-JS) with the pure JS version of the framework.
I thought that I needed the SWF+JS version to be able to do that.
That's a great surprise and usefull to split and reuse comum parts of the code.

Since a SWC it's a zip file, what's thw reason to use the library.swf inside of the file ?
I guess that the catalog.xml it's used by IDE (on my case VS Code) ?

Why not call the file something different like JSL (Java Script Library) or ARL (Apache Royale Library) ?

I see that I can easly debug the library with VS Code (that it's expanded on the application project) but I'm debuging you JS only that's not bad but would be great if we can debug the AS3/MXML files => Perhaps a new asconfig.json variable to build with the necessary metadata as source files to debug.

Regards,
Hugo.

Re: Royale libraries with JS only

Posted by Hugo Ferreira <hf...@gmail.com>.
Thank you.

Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia segunda,
23/05/2022 à(s) 15:06:

> Our compiler can read/understand the bytecode in the SWF file format, and
> this process does not rely on Flash Player in any way, so there will be no
> issues in the future.
>
> I don't know the purpose of catalog.xml. I assume the compiler uses it in
> some way, but I've never had a reason to investigate that file
> specifically.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Fri, May 20, 2022 at 4:29 PM Hugo Ferreira <hf...@gmail.com>
> wrote:
>
> > Thank you Josh.
> > So, it's "just" a file used by the compiler and we will never have issues
> > about the format and Flash, correct ?
> >
> > By the way, what's the reason for the xml file ?
> >
> > Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia sábado,
> > 21/05/2022
> > à(s) 00:13:
> >
> > > The bytecode in the library.swf file is used by the compiler for type
> > > checking and things. Similarly, IDEs use it to provide code
> intelligence.
> > >
> > > --
> > > Josh Tynjala
> > > Bowler Hat LLC <https://bowlerhat.dev>
> > >
> > >
> > > On Fri, May 20, 2022 at 3:02 PM Hugo Ferreira <hf...@gmail.com>
> > > wrote:
> > >
> > > > Hi,
> > > >
> > > > I was surprised today that I found that I can compile a library
> > (SWC-JS)
> > > > with the pure JS version of the framework.
> > > > I thought that I needed the SWF+JS version to be able to do that.
> > > > That's a great surprise and usefull to split and reuse comum parts of
> > the
> > > > code.
> > > >
> > > > Since a SWC it's a zip file, what's thw reason to use the library.swf
> > > > inside of the file ?
> > > > I guess that the catalog.xml it's used by IDE (on my case VS Code) ?
> > > >
> > > > Why not call the file something different like JSL (Java Script
> > Library)
> > > or
> > > > ARL (Apache Royale Library) ?
> > > >
> > > > I see that I can easly debug the library with VS Code (that it's
> > expanded
> > > > on the application project) but I'm debuging you JS only that's not
> bad
> > > but
> > > > would be great if we can debug the AS3/MXML files => Perhaps a new
> > > > asconfig.json variable to build with the necessary metadata as source
> > > files
> > > > to debug.
> > > >
> > > > Regards,
> > > > Hugo.
> > > >
> > >
> >
>

Re: Royale libraries with JS only

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
Our compiler can read/understand the bytecode in the SWF file format, and
this process does not rely on Flash Player in any way, so there will be no
issues in the future.

I don't know the purpose of catalog.xml. I assume the compiler uses it in
some way, but I've never had a reason to investigate that file specifically.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Fri, May 20, 2022 at 4:29 PM Hugo Ferreira <hf...@gmail.com>
wrote:

> Thank you Josh.
> So, it's "just" a file used by the compiler and we will never have issues
> about the format and Flash, correct ?
>
> By the way, what's the reason for the xml file ?
>
> Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia sábado,
> 21/05/2022
> à(s) 00:13:
>
> > The bytecode in the library.swf file is used by the compiler for type
> > checking and things. Similarly, IDEs use it to provide code intelligence.
> >
> > --
> > Josh Tynjala
> > Bowler Hat LLC <https://bowlerhat.dev>
> >
> >
> > On Fri, May 20, 2022 at 3:02 PM Hugo Ferreira <hf...@gmail.com>
> > wrote:
> >
> > > Hi,
> > >
> > > I was surprised today that I found that I can compile a library
> (SWC-JS)
> > > with the pure JS version of the framework.
> > > I thought that I needed the SWF+JS version to be able to do that.
> > > That's a great surprise and usefull to split and reuse comum parts of
> the
> > > code.
> > >
> > > Since a SWC it's a zip file, what's thw reason to use the library.swf
> > > inside of the file ?
> > > I guess that the catalog.xml it's used by IDE (on my case VS Code) ?
> > >
> > > Why not call the file something different like JSL (Java Script
> Library)
> > or
> > > ARL (Apache Royale Library) ?
> > >
> > > I see that I can easly debug the library with VS Code (that it's
> expanded
> > > on the application project) but I'm debuging you JS only that's not bad
> > but
> > > would be great if we can debug the AS3/MXML files => Perhaps a new
> > > asconfig.json variable to build with the necessary metadata as source
> > files
> > > to debug.
> > >
> > > Regards,
> > > Hugo.
> > >
> >
>

Re: Royale libraries with JS only

Posted by Hugo Ferreira <hf...@gmail.com>.
Thank you Josh.
So, it's "just" a file used by the compiler and we will never have issues
about the format and Flash, correct ?

By the way, what's the reason for the xml file ?

Josh Tynjala <jo...@bowlerhat.dev> escreveu no dia sábado, 21/05/2022
à(s) 00:13:

> The bytecode in the library.swf file is used by the compiler for type
> checking and things. Similarly, IDEs use it to provide code intelligence.
>
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev>
>
>
> On Fri, May 20, 2022 at 3:02 PM Hugo Ferreira <hf...@gmail.com>
> wrote:
>
> > Hi,
> >
> > I was surprised today that I found that I can compile a library (SWC-JS)
> > with the pure JS version of the framework.
> > I thought that I needed the SWF+JS version to be able to do that.
> > That's a great surprise and usefull to split and reuse comum parts of the
> > code.
> >
> > Since a SWC it's a zip file, what's thw reason to use the library.swf
> > inside of the file ?
> > I guess that the catalog.xml it's used by IDE (on my case VS Code) ?
> >
> > Why not call the file something different like JSL (Java Script Library)
> or
> > ARL (Apache Royale Library) ?
> >
> > I see that I can easly debug the library with VS Code (that it's expanded
> > on the application project) but I'm debuging you JS only that's not bad
> but
> > would be great if we can debug the AS3/MXML files => Perhaps a new
> > asconfig.json variable to build with the necessary metadata as source
> files
> > to debug.
> >
> > Regards,
> > Hugo.
> >
>

Re: Royale libraries with JS only

Posted by Josh Tynjala <jo...@bowlerhat.dev>.
The bytecode in the library.swf file is used by the compiler for type
checking and things. Similarly, IDEs use it to provide code intelligence.

--
Josh Tynjala
Bowler Hat LLC <https://bowlerhat.dev>


On Fri, May 20, 2022 at 3:02 PM Hugo Ferreira <hf...@gmail.com>
wrote:

> Hi,
>
> I was surprised today that I found that I can compile a library (SWC-JS)
> with the pure JS version of the framework.
> I thought that I needed the SWF+JS version to be able to do that.
> That's a great surprise and usefull to split and reuse comum parts of the
> code.
>
> Since a SWC it's a zip file, what's thw reason to use the library.swf
> inside of the file ?
> I guess that the catalog.xml it's used by IDE (on my case VS Code) ?
>
> Why not call the file something different like JSL (Java Script Library) or
> ARL (Apache Royale Library) ?
>
> I see that I can easly debug the library with VS Code (that it's expanded
> on the application project) but I'm debuging you JS only that's not bad but
> would be great if we can debug the AS3/MXML files => Perhaps a new
> asconfig.json variable to build with the necessary metadata as source files
> to debug.
>
> Regards,
> Hugo.
>