blob: 0afb62690f5ded5b0c2f882d64b479b35434a546 [file] [log] [blame]
<!doctype html><html lang="en"><head><meta charset="utf-8"><meta http-equiv="CACHE-CONTROL" content="NO-CACHE"><meta http-equiv="Content-Type" content="text/html; charset=UTF-8"><meta name="viewport" content="width=device-width,initial-scale=1,maximum-scale=1,user-scalable=no"><meta http-equiv="X-UA-Compatible" content="ie=edge"><title>Apache Royale Blog</title><link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css"><link rel="stylesheet" href="/css/styles.css"><link rel="shortcut icon" href="/img/favicon.ico"></head><body class="page post" id="main"><header class="docs-header"><div class="container"><div class="topbar"><div class="topbar-left"><a href="/"><span class="site-title">Apache Royale</span></a></div><div class="topbar-center"></div><div class="topbar-right"><button class="topMenu-dropbtn"><i class="fa fa-bars"></i>&nbsp;Menu</button><ul class="topMenu"><li><a href="/features">Features</a></li><li><a href="https://apache.github.io/royale-docs/get-started">Get Started</a></li><li><a href="/download">Download</a></li><li><a href="/docs">Docs</a></li><li><a href="/blog">Blog</a></li><li><a href="https://github.com/apache/royale-asjs/wiki/Apache-Royale-Source-Code-Repositories"><i class="fa fa-github"></i> GitHub</a></li></ul></div></div><div class="post-header"><h1>Apache Royale Blog</h1><div class="post-meta"></div></div></div></header><div class="page-content"><div class="container"><article><h2 class="post-title"><a href="/blog/using-jewel-alert-control/">Using the Jewel Alert Control</a></h2><div class="post-meta">by Carlos Rovira on April 06, 2018</div><div><p>The following code shows the basic method for displaying an <strong>Alert</strong> dialog in a Royale application. It uses the new Jewel UI set that supports themes and is available in <a href="https://royale.apache.org/download/">the 0.9.4 release or later</a>.</p><pre><code class="language-mxml">&lt;?xml version=&quot;1.0&quot; encoding=&quot;UTF-8&quot;?&gt;
&lt;j:Application xmlns:fx=&quot;http://ns.adobe.com/mxml/2009&quot;
xmlns:j=&quot;library://ns.apache.org/royale/jewel&quot;&gt;
&lt;fx:Script&gt;
&lt;![CDATA[
import org.apache.royale.jewel.Alert;
import org.apache.royale.events.CloseEvent;
private function clickHandler(event:MouseEvent):void {
var alert:Alert = Alert.show(&quot;Do you want to save your changes?&quot;, &quot;Save Changes&quot;, Alert.YES | Alert.NO);
alert.addEventListener(CloseEvent.CLOSE, alertClickHandler);
}
private function alertClickHandler(event:CloseEvent):void {
if (event.detail == Alert.YES)
button.text=&quot;You answered Yes&quot;;
else
button.text=&quot;You answered No&quot;;
}
]]&gt;
&lt;/fx:Script&gt;
&lt;j:initialView&gt;
&lt;j:View&gt;
&lt;j:Button id=&quot;button&quot; text=&quot;Click Me&quot; emphasis=&quot;primary&quot; click=&quot;clickHandler(event)&quot;/&gt;
&lt;/j:View&gt;
&lt;/j:initialView&gt;
&lt;/j:Application&gt;
</code></pre><p>In this example, the Jewel button adds a click handler that will be in charge of showing the Alert control. When the user clicks the button the Alert.show() static method is called. You can add a custom message, a custom title and choose which buttons will be created for that instance of the Alert.</p><p>Finally, the Alert instance adds an event listener to manage the alert response when the dialog is closed. In this example we're changing the label of the button according to the button the user clicks in the Alert.</p><h2>Where to go from here</h2><ul><li><a href="https://apache.github.io/royale-docs/component-sets/jewel/alert">Jewel Alert Royale Docs page</a></li><li><a href="https://apache.github.io/royale-docs/component-sets/jewel/button">Jewel Button Royale Docs page</a></li></ul><p>The result of this code snippet is the following:</p><iframe width="100%" height="300" src="/blog-examples/BE0002_Using_Jewel_Alert_Control/index.html"></iframe><p>(We're using an iframe to host the actual results of this example compilation. To see the example in a separate window click <a href="/blog-examples/BE0002_Using_Jewel_Alert_Control/index.html" target="_blank">this link</a>.)</p><p>Full project with source code can be found <a href="https://github.com/apache/royale-asjs/tree/develop/examples/blog/BE0002_Using_Jewel_Alert_Control">here</a>:</p><p><a class="btn btn-download" href="https://github.com/apache/royale-asjs/tree/develop/examples/blog/BE0002_Using_Jewel_Alert_Control"><i class="fa fa-download"></i> Project Source Code</a></p></div><h2 class="post-title"><a href="/blog/apache-royale-v0-9-2-released/">Apache Royale v0.9.2 released!</a></h2><div class="post-meta">by Carlos Rovira on March 19, 2018</div><div><p>The Apache Royale community is pleased to announce the release of Apache Royale 0.9.2.</p><p><img src="/img/blog/release-0.9.2.png" alt=""></p><p>The Apache Royale project is a continuation of the previous effort called FlexJS to produce a next-generation of the Apache Flex SDK that enables developers to use MXML and ActionScript to generate HTML/JS/CSS applications which can run natively in browsers. The cross-compiled code can also be used in Apache Cordova (Adobe PhoneGap) mobile applications.</p><p>This release should be considered 'beta' quality. The purpose of this release is to gather feedback about the features and implementation strategies, and to recruit new contributors. We hope to grow the code base into an SDK and tool chain that delivers the highest productivity when developing applications that can run on many platforms. Beta releases may not handle production needs.</p><h2>Changes in 0.9.2:</h2><ul><li>Added <a href="https://github.com/apache/royale-asjs/issues/129">ApplicationParametersBead and ApplicationParametersCaseInsensitiveBead</a></li><li>Added virtual item renderer management for fixed row height vertical lists.</li><li>Added Menu and MenuBar</li><li>Added DividedBox</li><li>Many CSS default values are now in the basic.css theme.</li><li>Theme support. Now compiler will copy all resources in &quot;assets&quot; folder to target</li><li>Added JSON2ASVO, a utility that creates AS classes from a JSON result</li><li>Added JSONReviver, a class that converts JSON to AS classes sort of like AMF</li><li>Added HScrollViewport</li><li>Added VScrollViewport</li><li>Fixed bugs in XML parsing and converting back to strings<ul><li>https://github.com/apache/royale-asjs/issues/120</li><li>https://github.com/apache/royale-asjs/issues/121</li><li>https://github.com/apache/royale-asjs/issues/122</li><li>https://github.com/apache/royale-asjs/issues/123</li></ul></li><li>Fixed Maven distribution so you can use in IDEs like VSCode, Moonshine and more.<ul><li>https://github.com/apache/royale-asjs/issues/125</li></ul></li></ul><p>You can see more <a href="https://github.com/apache/royale-asjs/blob/develop/RELEASE_NOTES.md">here</a>.</p><p>You can download a <a href="https://royale.apache.org/download/">binary distribution</a>, the <a href="https://royale.apache.org/source-code/">source code</a> or browse our <a href="https://github.com/apache/royale-asjs/wiki/Apache-Royale-Source-Code-Repositories">GitHub repositories</a>. If you're a NPM user you can check <a href="https://www.npmjs.com/org/apache-royale">Apache Royale at NPM</a>.</p><p>As well, you can help us <a href="https://github.com/apache/royale-asjs/issues">filing bugs in the framework</a> or <a href="https://github.com/apache/royale-compiler/issues">compiler</a>.</p><p>For questions about how to use Royale, send email to <a href="users@royale.apache.org">mailto:users@royale.apache.org</a>. For questions and feedback on the development of the source code in the release, send email to <a href="mailto:dev@royale.apache.org">dev@royale.apache.org</a>.</p><p>Enjoy! 🙂</p></div><h2 class="post-title"><a href="/blog/apache-royale-v0-9-1-released/">Apache Royale v0.9.1 released!</a></h2><div class="post-meta">by Carlos Rovira on February 14, 2018</div><div><p>The Apache Royale community is pleased to announce the release of Apache Royale 0.9.1.</p><p><img src="/img/blog/release-0.9.1.png" alt=""></p><p>The Apache Royale project is a continuation of the previous effort called FlexJS to produce a next-generation of the Apache Flex SDK that enables developers to use MXML and ActionScript to generate HTML/JS/CSS applications which can run natively in browsers. The cross-compiled code can also be used in Apache Cordova (Adobe PhoneGap) mobile applications.</p><p>This release should be considered 'beta' quality. The purpose of this release is to gather feedback about the features and implementation strategies, and to recruit new contributors. We hope to grow the code base into an SDK and tool chain that delivers the highest productivity when developing applications that can run on many platforms. Beta releases may not handle production needs.</p><p>You can download a <a href="https://royale.apache.org/download/">binary distribution</a>, the <a href="https://royale.apache.org/source-code/">source code</a> or browse our <a href="https://github.com/apache/royale-asjs/wiki/Apache-Royale-Source-Code-Repositories">GitHub repositories</a>. If you're a NPM user you can check <a href="https://www.npmjs.com/org/apache-royale">Apache Royale at NPM</a>.</p><p>As well, you can help us <a href="https://github.com/apache/royale-asjs/issues">filing bugs in the framework</a> or <a href="https://github.com/apache/royale-compiler/issues">compiler</a>.</p><p>For questions about how to use Royale, send email to <a href="users@royale.apache.org">mailto:users@royale.apache.org</a>. For questions and feedback on the development of the source code in the release, send email to <a href="mailto:dev@royale.apache.org">dev@royale.apache.org</a>.</p><p>Enjoy! 🙂</p></div><a class="btn btn-quiet" href="/blog/page/7/"><i class="fa fa-arrow-left"></i> Newer Posts</a> <a class="btn btn-quiet" href="/blog/page/9/">Older Posts <i class="fa fa-arrow-right"></i></a></article></div></div><footer class="footer"><div class="footer-row"><div class="footer-column"><ul class="footer-list"><li class="apacheroyale"><a href="/">Apache Royale</a></li><li><a href="/">Home</a></li><li><a href="/features">Features</a></li><li><a href="/download">Download</a></li><li><a href="/ides">IDEs and Editors</a></li><li><a href="/showcase">Showcase</a></li><li><a href="/blog">Blog</a></li><li><a href="/team">Team</a></li><li><a href="/thanks-to">Thanks To</a></li><li><a href="https://apache.org/logos/#royale"><i class="fa fa-external-link-square"></i> Logos</a></li><li><a href="https://www.apache.org/licenses/"><i class="fa fa-external-link-square"></i> Apache License v2.0</a></li></ul></div><div class="footer-column"><ul class="footer-list"><li class="documentation"><a href="/docs">Documentation</a></li><li><a href="https://apache.github.io/royale-docs/get-started">Get Started</a></li><li><a href="/docs">Docs</a></li><li><a href="/asdoc">API Reference</a></li><li><a href="https://github.com/apache/royale-asjs/wiki"><i class="fa fa-github"></i>Wiki</a></li><li><a href="https://stackoverflow.com/questions/tagged/apache-royale"><i class="fa fa-stack-overflow"></i> StackOverFlow Tag</a></li></ul><ul class="footer-list"><li class="community"><a href="/get-involved">Community</a></li><li><a href="/get-involved">Get Involved</a></li><li><a href="/mailing-lists">Mailing Lists</a></li><li><a href="/faq">FAQ</a></li></ul><ul class="footer-list"><li class="development"><a href="/source-code">Development</a></li><li><a href="https://github.com/apache/royale-asjs/wiki/Apache-Royale-Source-Code-Repositories"><i class="fa fa-github"></i> Github</a></li><li><a href="https://github.com/apache/royale-asjs/issues"><i class="fa fa-github"></i> Issues</a></li><li><a href="/source-code"><i class="fa fa-code"></i> Source Code</a></li></ul></div><div class="footer-column"><ul class="footer-list"><li class="social_t">Social</li><li><a href="https://twitter.com/apacheroyale"><i class="fa fa-twitter"></i> Twitter</a></li><li><a href="https://facebook.com/ApacheRoyaleSDK/"><i class="fa fa-facebook"></i> Facebook</a></li><li><a href="https://www.linkedin.com/groups/12118437"><i class="fa fa-linkedin"></i> LinkedIn</a></li><li><a href="/feed/index.xml"><i class="fa fa-rss"></i> RSS</a></li></ul><ul class="footer-list"><li class="apache"><a href="https://www.apache.org/">Apache</a></li><li><a href="https://www.apache.org/"><i class="fa fa-external-link-square"></i> Apache</a></li><li><a href="https://www.apache.org/foundation/contributing.html"><i class="fa fa-external-link-square"></i> Donations</a></li><li><a href="https://www.apache.org/events/current-event"><i class="fa fa-external-link-square"></i> Events</a></li><li><a href="https://www.apache.org/foundation/sponsorship.html"><i class="fa fa-external-link-square"></i> Sponsorship</a></li><li><a href="https://www.apache.org/foundation/thanks.html"><i class="fa fa-external-link-square"></i> Thanks</a></li><li><a href="https://www.apache.org/security/"><i class="fa fa-external-link-square"></i>Security</a></li></ul></div><div class="aboutusdiv"><p class="aboutus">About Us</p><p class="aboutus_p"><img class="aboutus-logo" src="/img/apache-royale-logo-footer-circle-grey.svg"><a href="/" class="aboutus_a">Apache Royale™</a> is a highly productive open source application technology for building expressive frontend applications that outputs to different formats and deploy consistently on all major browsers, desktops and devices.</p><p><img class="aboutus-apache-logo" src="/img/Apache_PoweredBy.svg"> <a href="/" class="aboutus_a">Apache Royale™</a>, <a href="https://www.apache.org" class="aboutus_a">Apache™</a> and the <a href="https://www.apache.org/foundation/press/kit/" class="aboutus_a">Apache feather logo™</a> are trademarks of The Apache Software Foundation. All other marks mentioned may be trademarks or registered trademarks of their respective owners. Read more about our privacy policy on our <a href="/privacy-policy">Privacy Policy page</a>.</p></div></div><div class="asf">Copyright &copy; 2017-2022 <a href="https://www.apache.org">The Apache Software Foundation</a>, Licensed under the <a href="https://www.apache.org/licenses/LICENSE-2.0">Apache License, Version 2.0</a></div></footer></body></html>