royale-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Fréderic Cox <coxfrede...@gmail.com>
Subject Re: Library SWC (library path)
Date Wed, 26 Sep 2018 13:21:03 GMT
I tried external-library-path but if I do not use js-library-path I get
compile errors "Access of possibly undefined property .."

EnalityFlexLibrary is an existing Flex library.

On Wed, Sep 26, 2018 at 2:57 PM Piotr Zarzycki <piotrzarzycki21@gmail.com>
wrote:

> Hi Frederic,
>
> Have you tried external-library-path ? There is some explanation how
> js-library-path working [1]. However EnalityFlexLibrary is a Flex library
> or did you create Royale swc ?
>
> [1]
> http://apache-royale-development.20373.n8.nabble.com/Difficulties-with-using-in-project-JS-version-of-Royale-swc-tp5999p6015.html
>
> Thanks,
> Piotr
>
> śr., 26 wrz 2018 o 14:49 Fréderic Cox <coxfrederic@gmail.com> napisał(a):
>
>> Can anyone help me on this? Why is this not working? The path to the SWC
>> is correct.
>>
>> <?xml version="1.0" encoding="utf-8"?>
>> <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009" xmlns:js=
>> "library://ns.apache.org/royale/express" applicationComplete=
>> "applicationCompleteHandler(event)">
>>
>> <fx:Script>
>> <![CDATA[
>> import org.apache.royale.events.Event;
>> import com.enality.utils.ServerUtil;
>> // import com.enality.EnalityData;
>>
>> private function applicationCompleteHandler(evt:Event):void{
>> // alert(EnalityData.rootURL);
>> ServerUtil.setServerSettings();
>> // alert(EnalityData.rootURL);
>> }
>> ]]>
>> </fx:Script>
>>
>>
>> <js:initialView>
>> <js:View>
>> <js:Label text="Hello EnalityCMS!" x="100" y="100" />
>> </js:View>
>> </js:initialView>
>>
>>
>>
>> </js:Application>
>>
>> {
>> "compilerOptions": {
>> "source-map": true,
>> "targets": [
>> "JSRoyale"
>> ],
>> "js-library-path": [
>>
>> "/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
>> ],
>> "library-path": [
>>
>> "/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
>> ],
>> "html-output-filename": "index.html"
>> },
>> "files": [
>> "src/EnalityCMS.mxml"
>> ]
>> }
>>
>> Error I'm getting =
>>
>> using SWC:
>> /Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc
>> Could not find file for class: com.enality.utils.ServerUtil
>> Error: File not found: com.enality.utils.ServerUtil
>>
>> On Wed, Sep 26, 2018 at 2:37 PM Fréderic Cox <coxfrederic@gmail.com>
>> wrote:
>>
>>> However I can't seem to reference code from inside the .swc. Here is my
>>> asconfig.json file:
>>>
>>> {
>>> "compilerOptions": {
>>> "source-map": true,
>>> "targets": [
>>> "JSRoyale"
>>> ],
>>> "library-path": [
>>>
>>> "/Users/frederic/Desktop/Exuvis/CityFashion/EnalityFlexLibrary/bin/EnalityFlexLibrary.swc"
>>> ],
>>> "html-output-filename": "index.html"
>>> },
>>> "files": [
>>> "src/EnalityCMS.mxml"
>>> ]
>>> }
>>>
>>> On Wed, Sep 26, 2018 at 12:44 PM Fréderic Cox <coxfrederic@gmail.com>
>>> wrote:
>>>
>>>> OK I found it, info about this on
>>>> https://github.com/BowlerHatLLC/vscode-nextgenas/wiki/asconfig.json#library-path
>>>>
>>>> On Wed, Sep 26, 2018 at 12:12 PM Fréderic Cox <coxfrederic@gmail.com>
>>>> wrote:
>>>>
>>>>> Hi,
>>>>>
>>>>> I've managed to create my first Hello World app using Apache Royale.
>>>>> Now I'm wondering how can I link existing .swc's? I have a bunch of library
>>>>> projects which have assets, .as code files and .mxml code files. Is it
>>>>> possible to link those .swc files in an Apache Royale project (I'm using
>>>>> VSCode)? I want to be able to use the API's from the library in my new
>>>>> ApacheRoyale project so I can keep using the same libraries I used when
>>>>> working in Flash Builder with Flex for AIR.
>>>>>
>>>>> Thanks for the info!
>>>>>
>>>>> Best regards,
>>>>>
>>>>> Fréderic
>>>>>
>>>>
>
> --
>
> Piotr Zarzycki
>
> Patreon: *https://www.patreon.com/piotrzarzycki
> <https://www.patreon.com/piotrzarzycki>*
>

Mime
View raw message