Issue when extending mx.Core.Application

classic Classic list List threaded Threaded
7 messages Options
Reply | Threaded
Open this post in threaded view
|

Issue when extending mx.Core.Application

tranquiliste
Hello all,

I have a strange issue with my code.
 
I have a class that extends mx.core.Application and which is use in my main
mxml. It compiles without any error but do not displays anything.
There must be somtething wrong but I can't see it
Here is the code below

Thanks for your help

*TestClass.as*
package application
{
        import mx.core.Application;

        public class TestClass extends Application
        {
                /**
                 * Constructeur
                 */
                public function TestClass()
                {
                        super();
                }
        }
}
and my entry
*Test.mxml*
<appli:TestClass
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:appli="application.*"
        xmlns:mx="library://ns.apache.org/royale/mx"
        width="600" height="400" layout="horizontal">
       
        <mx:VBox>
                <mx:Label id="Toto" text="Toto"/>
        </mx:VBox>

</appli:TestClass>





-----
Nicolas
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Nicolas
Reply | Threaded
Open this post in threaded view
|

Re: Issue when extending mx.Core.Application

Carlos Rovira-2
Hi Nicolas,

although I have 0 experience with emulation your class seems right to me. Maybe the problem is something else in your configuration or setup?

El mié., 22 jul. 2020 a las 7:54, tranquiliste (<[hidden email]>) escribió:
Hello all,

I have a strange issue with my code.

I have a class that extends mx.core.Application and which is use in my main
mxml. It compiles without any error but do not displays anything.
There must be somtething wrong but I can't see it
Here is the code below

Thanks for your help

*TestClass.as*
package application
{       
        import mx.core.Application;

        public class TestClass extends Application
        {
                /**
                 * Constructeur
                 */
                public function TestClass()
                {
                        super();
                }
        }
}
and my entry
*Test.mxml*
<appli:TestClass
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:appli="application.*"
        xmlns:mx="library://ns.apache.org/royale/mx"
        width="600" height="400" layout="horizontal">

        <mx:VBox>
                <mx:Label id="Toto" text="Toto"/>
        </mx:VBox>

</appli:TestClass>





-----
Nicolas
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/


--
Reply | Threaded
Open this post in threaded view
|

RE: Issue when extending mx.Core.Application

yishayw
In reply to this post by tranquiliste

Looks like a bug to me. Can you file it on GitHub [1]?

 

[1] https://github.com/apache/royale-asjs/issues

 

From: [hidden email]
Sent: Wednesday, July 22, 2020 8:54 AM
To: [hidden email]
Subject: Issue when extending mx.Core.Application

 

Hello all,

I have a strange issue with my code.
 
I have a class that extends mx.core.Application and which is use in my main
mxml. It compiles without any error but do not displays anything.
There must be somtething wrong but I can't see it
Here is the code below

Thanks for your help

*TestClass.as*
package application
{      
        import mx.core.Application;

        public class TestClass extends Application
        {
                /**
                 * Constructeur
                 */
                public function TestClass()
                {
                        super();
                }
        }
}
and my entry
*Test.mxml*
<appli:TestClass
        xmlns:fx="http://ns.adobe.com/mxml/2009"
        xmlns:appli="application.*"
        xmlns:mx="library://ns.apache.org/royale/mx"
        width="600" height="400" layout="horizontal">
       
        <mx:VBox>
                <mx:Label id="Toto" text="Toto"/>
        </mx:VBox>

</appli:TestClass>





-----
Nicolas
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

 

Reply | Threaded
Open this post in threaded view
|

Re: Issue when extending mx.Core.Application

tranquiliste
In reply to this post by Carlos Rovira-2
Hello Carlos,

Thanks for your answer.

I don't knwow which part o f the configuration may be faulty
I am using Visual Studio Code as IDE and the BowlerHatLLC extension
My compiler options is as followed
{
    "compilerOptions": {
      "targets": ["JSRoyale"],
      "source-path": ["src"],
      "source-map": true,
      "library-path": [
        "${royalelib}/js/libs/MXRoyaleJS.swc"
      ],
      "js-library-path": [
        "${royalelib}/js/libs/MXRoyaleJS.swc"
    ],
      "html-output-filename": "TestApp.html"
    },
    "mainClass": "Test"
}



-----
Nicolas
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/
Nicolas
Reply | Threaded
Open this post in threaded view
|

RE: Issue when extending mx.Core.Application

yishayw

Hi Nicolas,

 

I’m not sure if we’re on the right thread here but I can’t understand what this asconfig.json is doing, and why MXRoyaleJS.swc is added separately in the library path.

 

For what it’s worth, here’s the asconfig.json I used for my emulation examples.

 

{

  "config": "flex",

  "compilerOptions": {

      "debug": false,

      "targets": ["JSRoyale"],

      "source-map": false,

      "source-path": ["src"],

      "html-template": "index-template.html",

      "js-compiler-option": [

          "--skip_type_inference"

      ],

      "js-external-library-path": ["libs"],

  },

  "copySourcePathAssets": true,

  "files":

  [

      "src/Examples.mxml"

  ]

}

 

From: [hidden email]
Sent: Thursday, July 23, 2020 9:56 AM
To: [hidden email]
Subject: Re: Issue when extending mx.Core.Application

 

Hello Carlos,

Thanks for your answer.

I don't knwow which part o f the configuration may be faulty
I am using Visual Studio Code as IDE and the BowlerHatLLC extension
My compiler options is as followed
{
    "compilerOptions": {
      "targets": ["JSRoyale"],
      "source-path": ["src"],
      "source-map": true,
      "library-path": [
        "${royalelib}/js/libs/MXRoyaleJS.swc"
      ],
      "js-library-path": [
        "${royalelib}/js/libs/MXRoyaleJS.swc"
    ],
      "html-output-filename": "TestApp.html"
    },
    "mainClass": "Test"
}



-----
Nicolas
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

 

Reply | Threaded
Open this post in threaded view
|

Re: Issue when extending mx.Core.Application

Piotr Zarzycki
Hi Yishay,

I do understand. If you wanted to use some classes related to server sight communication from MX library (MXRoyaleJS.swc) you need to add that parameter to your Jewel application. 

Thanks,
Piotr

czw., 23 lip 2020 o 09:15 Yishay Weiss <[hidden email]> napisał(a):

Hi Nicolas,

 

I’m not sure if we’re on the right thread here but I can’t understand what this asconfig.json is doing, and why MXRoyaleJS.swc is added separately in the library path.

 

For what it’s worth, here’s the asconfig.json I used for my emulation examples.

 

{

  "config": "flex",

  "compilerOptions": {

      "debug": false,

      "targets": ["JSRoyale"],

      "source-map": false,

      "source-path": ["src"],

      "html-template": "index-template.html",

      "js-compiler-option": [

          "--skip_type_inference"

      ],

      "js-external-library-path": ["libs"],

  },

  "copySourcePathAssets": true,

  "files":

  [

      "src/Examples.mxml"

  ]

}

 

From: [hidden email]
Sent: Thursday, July 23, 2020 9:56 AM
To: [hidden email]
Subject: Re: Issue when extending mx.Core.Application

 

Hello Carlos,

Thanks for your answer.

I don't knwow which part o f the configuration may be faulty
I am using Visual Studio Code as IDE and the BowlerHatLLC extension
My compiler options is as followed
{
    "compilerOptions": {
      "targets": ["JSRoyale"],
      "source-path": ["src"],
      "source-map": true,
      "library-path": [
        "${royalelib}/js/libs/MXRoyaleJS.swc"
      ],
      "js-library-path": [
        "${royalelib}/js/libs/MXRoyaleJS.swc"
    ],
      "html-output-filename": "TestApp.html"
    },
    "mainClass": "Test"
}



-----
Nicolas
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

 



--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki

Reply | Threaded
Open this post in threaded view
|

RE: Issue when extending mx.Core.Application

yishayw

Ok, got it. But I still don’t understand which thread this belongs to…

 

From: [hidden email]
Sent: Thursday, July 23, 2020 10:34 AM
To: [hidden email]
Subject: Re: Issue when extending mx.Core.Application

 

Hi Yishay,

 

I do understand. If you wanted to use some classes related to server sight communication from MX library (MXRoyaleJS.swc) you need to add that parameter to your Jewel application. 

 

Thanks,

Piotr

 

czw., 23 lip 2020 o 09:15 Yishay Weiss <[hidden email]> napisał(a):

Hi Nicolas,

 

I’m not sure if we’re on the right thread here but I can’t understand what this asconfig.json is doing, and why MXRoyaleJS.swc is added separately in the library path.

 

For what it’s worth, here’s the asconfig.json I used for my emulation examples.

 

{

  "config": "flex",

  "compilerOptions": {

      "debug": false,

      "targets": ["JSRoyale"],

      "source-map": false,

      "source-path": ["src"],

      "html-template": "index-template.html",

      "js-compiler-option": [

          "--skip_type_inference"

      ],

      "js-external-library-path": ["libs"],

  },

  "copySourcePathAssets": true,

  "files":

  [

      "src/Examples.mxml"

  ]

}

 

From: [hidden email]
Sent: Thursday, July 23, 2020 9:56 AM
To: [hidden email]
Subject: Re: Issue when extending mx.Core.Application

 

Hello Carlos,

Thanks for your answer.

I don't knwow which part o f the configuration may be faulty
I am using Visual Studio Code as IDE and the BowlerHatLLC extension
My compiler options is as followed
{
    "compilerOptions": {
      "targets": ["JSRoyale"],
      "source-path": ["src"],
      "source-map": true,
      "library-path": [
        "${royalelib}/js/libs/MXRoyaleJS.swc"
      ],
      "js-library-path": [
        "${royalelib}/js/libs/MXRoyaleJS.swc"
    ],
      "html-output-filename": "TestApp.html"
    },
    "mainClass": "Test"
}



-----
Nicolas
--
Sent from: http://apache-royale-users.20374.n8.nabble.com/

 


 

--

Piotr Zarzycki 

Patreon: https://www.patreon.com/piotrzarzycki