You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@royale.apache.org by GitBox <gi...@apache.org> on 2017/11/12 07:43:01 UTC

[GitHub] justinmclean opened a new issue #69: Using HTTPService fails to compile when adding Network dependancy to working program

justinmclean opened a new issue #69: Using HTTPService fails to compile when adding Network dependancy to working program
URL: https://github.com/apache/royale-asjs/issues/69
 
 
   With a working pom / basic example adding a HTTPService call and the Network library  as a dependancy fails to compile.
   
   Example code:
   ```
   <?xml version="1.0" encoding="utf-8"?>
   <js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
                   xmlns:js="library://ns.apache.org/royale/basic"
                   applicationComplete="init()">
   
       <fx:Script><![CDATA[
           import org.apache.royale.net.HTTPService;
   
           public var http:HTTPService = new HTTPService();
   
           public function init():void {
               load.url = "test.JSON";
               load.send();
           }
           ]]></fx:Script>
       
       <js:valuesImpl>
           <js:SimpleCSSValuesImpl/>
       </js:valuesImpl>
   
       <js:initialView>
           <js:View>
               <js:Label text="Hello World" />
           </js:View>
       </js:initialView>
   
   </js:Application>
   ```
   
   Add to pom.xml
   ```
       <dependency>
         <groupId>org.apache.royale.framework</groupId>
         <artifactId>Network</artifactId>
         <version>0.9.0-SNAPSHOT</version>
         <type>swc</type>
       </dependency>
   ```
   
   Fails to compile with several errors as it cannot find HTTPService:
   ```
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(7): col: 16 Warning: Definition org.apache.royale.net.HTTPService could not be found.
   
           import org.apache.royale.net.HTTPService;
                  ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(9): col: 25 Error: Type was not found or was not a compile-time constant: HTTPService.
   
           public var http:HTTPService = new HTTPService();
                           ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(9): col: 43 Error: Call to a possibly undefined method HTTPService.
   
           public var http:HTTPService = new HTTPService();
                                             ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(13): col: 13 Error: Access of possibly undefined property load.
   
               load.url = "test.JSON";
               ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(14): col: 13 Error: Access of possibly undefined property load.
   
               load.send();
               ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(7): col: 16 Definition org.apache.royale.net.HTTPService could not be found.
   
           import org.apache.royale.net.HTTPService;
                  ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(9): col: 25 Type was not found or was not a compile-time constant: HTTPService.
   
           public var http:HTTPService = new HTTPService();
                           ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(9): col: 43 Call to a possibly undefined method HTTPService.
   
           public var http:HTTPService = new HTTPService();
                                             ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(13): col: 13 Access of possibly undefined property load.
   
               load.url = "test.JSON";
               ^
   
   /Users/justinmclean/IdeaProjects/FlexJSTest/src/Example.mxml(14): col: 13 Access of possibly undefined property load.
   
               load.send();
   ```
   
   
   Working pom.xml had Basic, HTML, Language and playerglobal as dependancies.
   
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services