Hello, Carlos.

Thank you for the update on the example.

I compared it to the file on the site that was uploaded and found a
difference in index.html

I tried to find out why, but I found out that the sdk we used was different

The following index.html is different between royale0.9.7 and royale0.9.8.

apache-royale-0.9.8 index.html
--------------------------------
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="Custom Template for injecting custom style CSS">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" type="text/css"
href="Ryale098BrowserProject.min.css">
    <link href="https://fonts.googleapis.com/css?family=Lato:400,700";
rel="stylesheet">
<script type="text/javascript">
 var script = document.createElement("script");
 script.setAttribute("src", "
https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/highlight.min.js
");
 document.head.appendChild(script);
 var link = document.createElement("link");
 link.setAttribute("rel", "stylesheet");
 link.setAttribute("title", "Atom One Dark");
 link.setAttribute("type", "text/css");
 link.setAttribute("href", "
https://cdnjs.cloudflare.com/ajax/libs/highlight.js/9.12.0/styles/atom-one-dark.min.css
");
 document.head.appendChild(link);
</script>
<script type="text/javascript" src="./Ryale098BrowserProject.js"></script>

</head>
<body>
<script type="text/javascript">
new Ryale098BrowserProject().start();
</script>

</body>
</html>

apache-royale-0.9.7 index.html
--------------------------------
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
    <meta name="Custom Template for injecting custom style CSS">
    <meta name="viewport" content="width=device-width, initial-scale=1.0,
maximum-scale=1.0, user-scalable=no" />
    <link rel="stylesheet" type="text/css"
href="Royale097BrowserProject.min.css">
    <link href="https://fonts.googleapis.com/css?family=Lato:400,700";
rel="stylesheet">
<script type="text/javascript" src="./Royale097BrowserProject.js"></script>

</head>
<body>
<script type="text/javascript">
new Royale097BrowserProject().start();
</script>

</body>
</html>




It seems to work well with royale0.9.8

One question: will this @ externs not work on royale 0.9.7? Or do I need to
add something?


Also, thank you for teaching me about percentWidth and percentHeigh

I always used to write "width="100%", so this time it's smarter and easier
to understand


Thank you all for following along.

2020年8月11日(火) 18:32 Carlos Rovira <carlosrov...@apache.org>:

> Hi Yushiro,
>
> just updated the example:
> https://royale.apache.org/using-external-javascript-libraries-in-apache-royale/
>
> thanks for reporting. Through these months we modified some things like
> the inject_html directive, so I updated the code accordingly.
> Also the look and feel of jewel themes change a bit. I updated the running
> example.
> Also notice that at that time I used percentWidth/Height instead of the
> more common width="100%" for example.
> The link to hljs was referring to the Tour de Jewel example, while this
> example has its own for demonstration, so now is pointing to the right file
> in the repository.
>
> I think all is fine now.
>
> I'll try to update other examples too,
>
> El mar., 11 ago. 2020 a las 10:09, yushiro maeda (<royalesen...@gmail.com>)
> escribió:
>
>> Hello
>>
>> The location of the error.
>>
>> <j:Application xmlns:fx="http://ns.adobe.com/mxml/2009";
>> xmlns:j="library://ns.apache.org/royale/jewel" xmlns:js="library://
>> ns.apache.org/royale/basic" xmlns:html="library://
>> ns.apache.org/royale/html" initialize="codeTextLoader.send();">
>> <fx:Script> <![CDATA[ [Bindable] public var code_txt:String; public
>> function highLightContent():void { COMPILE::JS { 
>> hljs.highlightBlock(sourceCodeMXMLText.element);
>> } } ]]> </fx:Script>
>>
>> error at the
>>
>> hljs.highlightBlock(sourceCodeMXMLText.element)
>>
>>
>> Uncaught ReferenceError: hljs is not defined
>>
>>
>>
>> Best regards
>>
>> 2020年8月11日(火) 午後4:07 Yishay Weiss <yishayj...@hotmail.com>:
>>
>>> Hi Yushiro,
>>>
>>>
>>>
>>> Can you share your code so we can help you?
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *From: *yushiro maeda <royalesen...@gmail.com>
>>> *Sent: *Tuesday, August 11, 2020 9:56 AM
>>> *To: *users@royale.apache.org
>>> *Subject: *@externs tutorial I can not work.
>>>
>>>
>>>
>>> Hello
>>>
>>>
>>>
>>> I follow the tutorial below. But the link is bloken and the @externs
>>> does not seem to be recognized well
>>>
>>>
>>>
>>>
>>>
>>> Uncaght ReferenceError: hljs is not defined
>>>
>>>
>>>
>>>
>>>
>>> hljs.as is in the same src folder as main.mxml .but do I need anything
>>> else?
>>>
>>>
>>>
>>> It would be helpful if you could tell me.
>>>
>>>
>>>
>>> Best regards
>>>
>>>
>>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>

Reply via email to