Hi Jim,
Your namespace declarations look like:
xmlns:j="library://ns.apache.org/royale/jewel"
xmlns:js="library://ns.apache.org/royale/jewel"
I noticed 'j' and 'js' both point to the Jewel library. Did you mean for 'js'
to point to Basic?
Let us know if that will fix these warnings, maybe worth a try.
________________________________
From: Jim McNamara <[email protected]>
Sent: Sunday, March 23, 2025 12:01 AM
To: [email protected] <[email protected]>
Subject: can't get warning for Label or View import to go away
Hi,
I tried the following and can't make the error warnings go away:
<js:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:j="library://ns.apache.org/royale/jewel"
xmlns:js="library://ns.apache.org/royale/jewel"
xmlns:html="library://ns.apache.org/royale/html">
<fx:Script>
<![CDATA[
import org.apache.royale.jewel.Label;
import org.apache.royale.core.View;
]]>
</fx:Script>
<js:initialView>
<js:View>
<!-- Use the correct "text" attribute for the Label -->
<js:Label html="This example uses Modules to load parts of the
application"/>
</js:View>
</js:initialView>
</js:Application>
---------------------------------------------
asconfig.json /home/funnysys/royaledef
{
"source-path": [
"JSRoyale/main/src"
]
}
----------------------------------------------------
i have the sdk showing up in visualstudio code and it says mxml at the bottom
my compile looks like this:
/home/funnysys/royalebin/apache-royale-0.9.12-bin-js/royale-asjs/bin/mxmlc \
-output /home/funnysys/royaledef/JSRoyale/main/src/bin/js-release \
-library-path=/home/funnysys/royalebin/apache-royale-0.9.12-bin-js/royale-asjs/frameworks/js/libs/JewelJS/js/out
\
/home/funnysys/royaledef/JSRoyale/main/src/testabc.mxml
Using Royale SDK:
/home/funnysys/royalebin/apache-royale-0.9.12-bin-js/royale-asjs
MXMLJSC
--targets=js
-output
/home/funnysys/royaledef/JSRoyale/main/src/bin/js-release
-library-path=/home/funnysys/royalebin/apache-royale-0.9.12-bin-js/royale-asjs/frameworks/js/libs/JewelJS/js/out
/home/funnysys/royaledef/JSRoyale/main/src/testabc.mxml
Mar 22, 2025 7:49:44 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING:
/home/funnysys/royaledef/JSRoyale/main/src/bin/js-release/bin/js-debug/testabc.js:102:
WARNING - org.apache.royale.jewel.View is never defined
org.apache.royale.jewel.View,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 22, 2025 7:49:44 PM com.google.javascript.jscomp.LoggerErrorManager println
WARNING:
/home/funnysys/royaledef/JSRoyale/main/src/bin/js-release/bin/js-debug/testabc.js:110:
WARNING - org.apache.royale.jewel.Label is never defined
org.apache.royale.jewel.Label,
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
Mar 22, 2025 7:49:44 PM com.google.javascript.jscomp.LoggerErrorManager
printSummary
WARNING: 0 error(s), 2 warning(s), 96.0% typed
The project 'testabc' has been successfully compiled and optimized.
7.251624486 seconds
------------------------------------------------------
additional note is i tried the out dir with that because when i expanded the
swc it has an out for a folder. i know that probably isnt a good idea.
it isn't putting a index file but i made one like this with the ai help...
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Your Royale App</title>
</head>
<body>
<h1>Apache Royale JavaScript Application</h1>
<script src="testabc.js"></script>
</body>
</html>
thanks for any help,
j.
Sent with Proton Mail secure email.