Re: Update Server setting

2024-05-04 Thread Harbs
You can turn off CORS restrictions for localhost in your browser. That might 
make development easier.

Harbs

> On May 4, 2024, at 11:11 PM, MARK HARTNETT  wrote:
> 
> The CORs policy restricts unknown servers from exchanging data. Tomcat needs 
> a CorsFilter.jar and CorsFilter defined in the Tomcat6/conf/Web.xml and an 
> entry for localhost:3000.  I did that and still the same error.
>  
> When I press the login button, the connection is actually successful. I see 
> it in the db log.
> Somewhere between the connection and the return the cors error is thrown. 
> "http://localhost:3000' has been blocked by CORS policy" - Seems to say 
> Tomcat did the blocking
>  
> It's funny that I need to get by the login screen to work on the rest of the 
> system. 
>  
> Access to XMLHttpRequest at 
> 'http://localhost:8080/rootmodel/securityCommand.flex?reqType=login=randy=steak'
>  from origin 'http://localhost:3000' has been blocked by CORS policy: No 
> 'Access-Control-Allow-Origin' header is present on the requested resource.
>  
>> On 05/04/2024 8:47 AM EDT MARK HARTNETT  wrote:
>>  
>>  
>> Hi all,
>>  
>> My db server is up and running on 8080 and I get CORS policy: No 
>> 'Access-Control-Allow-Origin' error on connection. I'm guessing this is a 
>> server setting but I haven't been able to find the solution. 
>>  
>> Access to XMLHttpRequest at 
>> 'http://localhost:8080/rootmodel/securityCommand.flex?reqType=login=randy=steak'
>>  from origin 'http://localhost:3000' has been blocked by CORS policy: No 
>> 'Access-Control-Allow-Origin' header is present on the requested resource.
>>  
>> Thanks
>>> On 05/04/2024 8:36 AM EDT MARK HARTNETT  wrote:
>>>  
>>>  
>>> Almost every error has been a null reference and Iv'e either moved the code 
>>> to creationComplete or did as did as Maria said used ternary statements. 
>>>  
>>> The spark and mx comboBox always fails when the dataProvider is initially 
>>> null. The JS checks to see if the labelField is blank and adds "label" as 
>>> the labelField. (I think it's supposed to exit here)The the dp is accesed 
>>> using the labelField and throws an error.  
>>>  
>>> I switched to the Jewel comboBox and all of the null errors disappeared but 
>>> a lot of extra attribute errors. I have a lot of ComboBoxes with some 
>>> special functionality so I extended the Jewel CB and added some attributes 
>>> that get created as beads if not null. I did a global change from 
>>> s:ComboBox to my extended CL:ComboBox, and the system opened login with no 
>>> errors in the log. 
>>> 
>>> http://ns.adobe.com/mxml/2009; 
>>> xmlns:j="library://ns.apache.org/royale/jewel"> 
>>> 
>>>  
>>>  
>>>  
>>> 
>>>  
>>>  
>>>  
>>>> On 05/02/2024 2:29 PM EDT Maria Jose Esteve  wrote:
>>>>  
>>>>  
>>>> Hi Mark,
>>>> 
>>>> I don't know how the binding in Flex worked internally but if gp is null 
>>>> an error would surely occur, perhaps it was an internal error that was 
>>>> intercepted but...
>>>> 
>>>> I can share with you how I do it, although I don't know if it is the best 
>>>> way:
>>>> 
>>>> >>> btnA="['Home','Statistics','Network','MCA Grid']" 
>>>> btnBoxA="{!gp?[]:[gp.hpc, gp.statisticsCtrl, gp.siteNetworkCtrl, 
>>>> gp.dgBOX]}" 
>>>> itemH="36" 
>>>> fntSz="16"/>
>>>> 
>>>>  
>>>> Or 
>>>> btnBoxA="{!gp?null:[gp.hpc, gp.statisticsCtrl, gp.siteNetworkCtrl, 
>>>> gp.dgBOX]}"
>>>> 
>>>> Or 
>>>> btnBoxA="{!gp?[null,null,null,null]:[gp.hpc, gp.statisticsCtrl, 
>>>> gp.siteNetworkCtrl, gp.dgBOX]}"
>>>> 
>>>>  
>>>> It depends on what works for you.
>>>> 
>>>> 
>>>> Hiedra
>>>> 
>>>> De: MARK HARTNETT  
>>>> Enviado el: jueves, 2 de mayo de 2024 18:44
>>>> Para: users@royale.apache.org
>>>> Asunto: JS questions
>>>> 
>>>>  
>>>> Hi all,
>>>> 
>>>> All of my errors right now are null references. 
>>>> 
>>>>  
>>>> In this code gp.hpc crashes because hpc is null at this point.
>>>> 
>>>> In Flex, I didn't care about that because once init() was done it was no 
>>>> longer null.
>>>> 
>>>>  
>>>> >>> btnA="['Home','Statistics','Network','MCA Grid']" 
>>>> btnBoxA="{[gp.hpc, gp.statisticsCtrl, gp.siteNetworkCtrl, gp.dgBOX]}" 
>>>> itemH="36" 
>>>> fntSz="16"/>
>>>> 
>>>>  
>>>> With JS  the null hpc throws an error.
>>>> 
>>>> Moving those variables to creationComplete solves the problem.
>>>> 
>>>>  
>>>> What is the difference with JS binding and Flex in terms of timing and 
>>>> object creation?
>>>> 
>>>> Is there a a bead that allows nulls?
>>>> 
>>>>  
>>>> Thanks
>>>> 
>>>>  
>>>>  



Re: Royale AS3 with Starling Framework

2023-09-25 Thread Harbs
Very nice!

> On Sep 25, 2023, at 10:49 PM, Josh Tynjala  wrote:
> 
> Hi Royale community,
> 
> As you may know, I'm a big fan of finding ways for Royale's AS3 to JS
> compiler to work with emulated Flash APIs. Today, I'm sharing a little
> project created by Fancy2209 that uses AS3/Royale to build an app running
> on the GPU-accelerated Starling Framework.
> 
> Here's the "Flappy Starling" sample, compiled from AS3 to JS, running on
> top of OpenFL and Starling — in your web browser!
> 
> https://fancy2209.github.io/FlappyStarlingRoyale/
> 
> Source code available here:
> 
> https://github.com/Fancy2209/Flappy-Starling-Royale
> 
> --
> Josh Tynjala



Re: moonshine-ide possible virus

2023-06-07 Thread Harbs
Antivirus has a lot of false positives. Sometimes just rebuilding installers 
helps.

> On Jun 7, 2023, at 2:52 AM, Jim McNamara  wrote:
> 
> Hi-
> 
> Edition Windows 11 Pro
> Version 22H2
> Installed on ‎1/‎6/‎2023
> OS build 22621.1778
> Experience Windows Feature Experience Pack 1000.22642.1000.0
> 
> screenshot with snippet tool to follow :
> 
> thanks,
> j. mcnamara
> 
> 
> 
> Sent with Proton Mail  secure email.
> 
> --- Original Message ---
> On Wednesday, June 7th, 2023 at 5:35 AM, Piotr Zarzycki 
>  wrote:
> 
>> Can you post what exactly was reported? What is your OS version ?
>> 
>> śr., 7 cze 2023 o 11:31 Jim McNamara > > napisał(a):
>>> VirusTotal 
>>> 
>>> Sent with Proton Mail  secure email.
>>> 
>>> --- Original Message ---
>>> On Wednesday, June 7th, 2023 at 5:05 AM, Piotr Zarzycki 
>>> mailto:piotrzarzyck...@gmail.com>> wrote:
>>> 
 Hi Jim,
 
 Can you please provide a link to that antivirus. I have never heard about 
 nano antivirus.
 
 Thanks,
 Piotr
 
 śr., 7 cze 2023 o 10:53 Jim McNamara >>> > napisał(a):
> Hi all-
> 
> There is a possible virus that I reported in github at moonshine-ide 
> project in the issues. When you run the virus scan for virus total on the 
> .exe files for the sdk and the ide it says the nano antivirus picks up a 
> trojan virus.
> 
> thanks,
> jim
> 
> Sent with Proton Mail  secure email.
 
 
 -- 
 Piotr Zarzycki
 
>>> 
>> 
>> 
>> -- 
>> Piotr Zarzycki
>> 
> 



Re: Happy New Year team. 2023

2023-01-02 Thread Harbs
Happy New Year!

> On Jan 1, 2023, at 2:37 PM, Maria Jose Esteve  wrote:
> 
> Happy New Year team.
> Let's make 2023 the year of Apache Royale!!!
>  
> Hiedra



Re: Hierarchical presentation

2022-10-14 Thread Harbs
I’m not sure how much this helps you, but you can use something like the 
Spectrum Well for nested sections:
https://unhurdle.github.io/spectrum-royale/#!well

You can use a logic button in the header 
https://unhurdle.github.io/spectrum-royale/#!logic_button

and make the content of the Well a list with custom renderers for the items.

HTH,
Harbs

> On Oct 13, 2022, at 11:33 AM, Maria Jose Esteve  wrote:
> 
> Hello, I ask for your opinion...
> I must implement a "Query Builder" [1] and I can't find the right strategy, 
> does anyone have any idea how I could implement it?
>  
> [1] 
> https://drive.google.com/file/d/1pHBVJFNszJJNPdJfalr2E-4ggHeF6zUg/view?usp=sharing
>  
> <https://drive.google.com/file/d/1pHBVJFNszJJNPdJfalr2E-4ggHeF6zUg/view?usp=sharing>
> https://drive.google.com/file/d/1uDQ3gxr5dIv2J0fuop4MOs8r9-R2l7Og/view?usp=sharing
>  
> <https://drive.google.com/file/d/1uDQ3gxr5dIv2J0fuop4MOs8r9-R2l7Og/view?usp=sharing>
>  
> Hiedra



Re: UIComponent and transformation matrix

2022-10-03 Thread Harbs
There’s no examples that In can see, but here’s how it’s used:

1. The component should implement ITransformHost
2. The component needs a TransformModel bead.
3. The component needs a TransformBead. Royale has two TransformBeads. One is 
for svg and the other is for HTML elements. Make sure you use the correct one, 
or create your own which does what you need.
4. The transformMatrix getters and setters in the component should proxy the 
transform model like this:

public function get transformMatrix():Matrix
{
return _transformModel.matrix;
}

public function set transformMatrix(value:Matrix):void
{
_transformModel.matrix = value;
}

If you have those 4 items done, setting the transformMatrix will correctly 
transform your view. so basically instead of 

>> this.transform.matrix = m;

You’d use this.transformMatrix = m;

HTH,
Harbs

> On Oct 3, 2022, at 5:46 PM, CapitanoG76  wrote:
> 
> Thanks... I would be very interested in learning how to apply transformation 
> beads. Could not find an example
> 
> On Mon, 3 Oct 2022 at 13:43, Gabe Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> We also now have transformation beads. I’m not at my computer now to find an 
> example of how that works, but you I think there might be an example. Yishay 
> should be able to explain as well. I think he did that implementation.
> 
>> On 3 Oct 2022, at 2:32, CapitanoG76 > <mailto:capita...@gmail.com>> wrote:
>> 
>> 
>> Hello,
>> 
>> I am porting a Flex application into Royale in order to transpile to 
>> Javascript.
>> 
>> The application had some graphical elements which extended UIComponent and 
>> were added as children to an mx.containers.Canvas.
>> I was using UIComponent.transform.matrix to rotate the elements, however in 
>> Royale UIComponent does not have the transform property anymore. 
>> 
>> Is there any way I can apply rotation/translation to my elements? I'd need 
>> to write code similar to
>> 
>> var m:Matrix = new Matrix();
>> m.rotate(angle);
>> this.transform.matrix = m;
>> 
>> Thanks,
>> Marco



Re: UIComponent and transformation matrix

2022-10-03 Thread Gabe Harbs
We also now have transformation beads. I’m not at my computer now to find an 
example of how that works, but you I think there might be an example. Yishay 
should be able to explain as well. I think he did that implementation.

> On 3 Oct 2022, at 2:32, CapitanoG76  wrote:
> 
> 
> Hello,
> 
> I am porting a Flex application into Royale in order to transpile to 
> Javascript.
> 
> The application had some graphical elements which extended UIComponent and 
> were added as children to an mx.containers.Canvas.
> I was using UIComponent.transform.matrix to rotate the elements, however in 
> Royale UIComponent does not have the transform property anymore. 
> 
> Is there any way I can apply rotation/translation to my elements? I'd need to 
> write code similar to
> 
> var m:Matrix = new Matrix();
> m.rotate(angle);
> this.transform.matrix = m;
> 
> Thanks,
> Marco


Re: Introducing asformat

2022-09-28 Thread Harbs
That’s great!

This is a good reason to get another release out… :-)

Harbs

> On Sep 28, 2022, at 12:24 AM, Josh Tynjala  wrote:
> 
> I just wanted to follow up by mentioning that I recently added the ability 
> for the formatter load configuration files, in addition to the existing 
> command line options. It will automatically detect an asformat-config.xml 
> file in the current working directory, allowing you to easily specify 
> configuration options for a specific project. You can also use a new 
> -load-config option to load a configuration file from any path, not just the 
> current working directory. You can use -skip-local-config-file to ignore the 
> asformat-config.xml file.
> 
> Once we release the next Royale update, I plan to make vscode-as3mxml 
> automatically detect the asformat-config.xml file too, so you will be able to 
> configure formatting options for both the command line and VSCode at the same 
> time.
> 
> I also updated the Royale documentation to add a section for the formatter:
> 
> https://apache.github.io/royale-docs/formatter 
> <https://apache.github.io/royale-docs/formatter>
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev/>
> 
> 
> On Wed, Sep 22, 2021 at 10:42 AM Josh Tynjala  <mailto:joshtynj...@bowlerhat.dev>> wrote:
> Hey everyone,
> 
> I recently created asformat, which is a formatter for ActionScript code. It 
> is based on the Royale compiler's lexer that creates a stream of tokens. One 
> nice thing about working with the token stream versus a full AST (Abstract 
> Syntax Tree) is that it's easier to keep track of existing whitespace to 
> preserve it where appropriate.
> 
> In addition to command line usage, this formatter is intended to eventually 
> be used by IDEs/editors, such as VSCode and Moonshine.
> 
> You can find asformat in nightly builds for now. I'm still testing it with 
> existing codebases, but I wanted to share my progress so that others could 
> check it out, if interested.
> 
> Usage:
> 
> Format a file, and write it back to the file system:
> 
> asformat --write-files src/com/example/MyClass.as
> 
> Alternatively, format all .as files in a directory:
> 
> asformat --write-files src
> 
> Options:
> 
> --write-files: Writes the formatting changes back to the original files. If a 
> file has no formatting changes, it will not be modified. Alias: -w. Default: 
> false.
> 
> --list-files: Lists the files that have been changed by formatting. If a file 
> has no formatting changes, it won't be listed. Alias: -l. Default: false.
> 
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> 
> --tab-width: The width of tabs when insert-spaces is specified. (Default: 4)
> 
> --insert-final-new-line: Adds a final empty line at the end of the file, if 
> one doesn't exist already. (Default: false)
> 
> --open-brace-new-line: Controls whether an opening curly brace is placed on a 
> new line, or is "cuddled" on the current line. (Default: true)
> 
> --insert-space-for-loop-semicolon: Controls whether a space is inserted after 
> the semicolons in a for() loop. (Default: true)
> 
> --insert-space-control-flow-keywords: Controls whether a space is inserted 
> between control flow keywords (like if, for, while) and the following ( open 
> parenthesis. (Default: true)
> 
> --insert-space-anonymous-function-keyword: Controls whether a space is 
> inserted between the function keyword and the following ( open parenthesis, 
> if the function is anonymous (if it doesn't have a name). (Default: false)
> 
> --insert-space-binary-operators: Controls whether a space is inserted before 
> and after binary operators (like +, -, *, /, &&, ||, etc.) (Default: true)
> 
> --insert-space-comma-delimiter: Controls whether a space is inserted after 
> comma delimiters in Object and Array literals. (Default: true)
> 
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so that 
> the opening and closing curly brace are both on the same line or not. 
> (Default: false)
> 
> --max-preserve-new-lines: Specify the maximum number of new line characters 
> that are allowed to appear consecutively. (Default: 2)
> 
> --semicolons: Controls how semicolons are handled. Valid values are insert, 
> remove, and ignore. Insert means that missing semicolons are inserted. Remove 
> means that all semicolons are removed, and ignore means that there is no 
> change to semicolons in the file. (Default: insert)
> 
> Additional notes:
> 
> If neither --write-files nor --list-files is specified, the formatted source 
> code is written to standard output instead.
> 
> If no files are specified, asformat waits for standard input instead.
> 
> --
> Josh Tynjala
> Bowler Hat LLC <https://bowlerhat.dev/>



Re: apache royale and Node js

2022-03-22 Thread Harbs
Ah. I guess I can publish the SWC on npm. Haven’t considered that.

You can just copy the swc and you should not need to do anything “special”.

> On Mar 22, 2022, at 1:18 PM, Roman Isitua  wrote:
> 
> As Spectrum is not part of the royale distribution since it is a standalone 
> library. I am just wondering how spectrum can be packaged just like the 
> others for use in a royale project that uses node instead of maven. 
> 



Re: apache royale and Node js

2022-03-22 Thread Harbs


> On Mar 22, 2022, at 12:35 PM, Roman Isitua  wrote:
> 
> 
> I recently stumbled upon the below links
> 
> https://apache.github.io/royale-docs/get-started/royale-cli 
> 
> 
> https://apache.github.io/royale-docs/features/nodejs 
> 
> 
> It looks pretty interesting. As I look to bring new front end developers to 
> join my team. Using royale with a  node js compiler might be a good option. 
> Since most front end developers have no back end experience so tools like 
> maven, ant might be an obstacle to rapid adoption.
> 
> 
> I have the following questions to ask
> 1. Royale cli integration supports hot deployment. i.e. Listens to the src 
> folder. When any file changes, it will recompile the app and reload the 
> browser to show the updated application.)  
> 
> Is this supported when using maven ? If yes. how ?
> 
> It is a major productivity booster.
> 

I’m not sure exactly what’s supported using the cli. It’s a node module. I’m 
not sure how to run node commands from Maven.

Josh is in the processing of adding “watching” features to the Royale compiler 
directly. When he’s done it should be possible to compile an app and then as 
you save changes to your project, an incremental compilation of the changes 
will automatically be run. Since it’ll be a native to the compiler, it should 
run from Maven mcuh as you do today. Not sure about Live Reload though. I 
imagine we’ll have to figure that out when we get there...

> 
> 2. I have started using spectrum UI components. Spectrum is a stand alone 
> royale library. How can I make the Spectrum.swc available to the royale node 
> js module ?
> 
> I have been a back end developer for most of my career so I only recently 
> entered the terrain of front end development with html, javascript and css.

Spectrum is strictly front-end. It might be possible to use node modules which 
emulate the browser, but I imagine you’ll run into issues.

Why would you want to use Spectrum on the back-end?

For Node projects, I’d expect to stick to Native AS3 and Node APIs — not 
browser ones.

Re: Royale support for progressive web apps (pwa)

2022-03-22 Thread Harbs
 possible.
> 
>  
> 
> Also, IMO, there are 3 "levels" of Royale integration for external libraries: 
>  Full, partial, and none.  Full integration generally involves wrapping 
> external in AS classes.  Most of the current SWCs do that.  An AS Class is 
> instantiated and its APIs do things to some JS library.  That generally 
> provides the most developer productivity because the library supports MXML 
> (no constructor parameters, more get/set APIs instead of functions/methods) 
> and AS (strong typing).  However, that means more code runs since you are 
> essentially wrapping a library in a library.
> 
>  
> 
> Partial integration involves creating a few AS classes to talk to the JS 
> library.  I think the ACE SWC does is an example of partial integration.
> 
>  
> 
> And "none" means that you are writing code that pretty much calls the 
> typedefs directly.
> 
>  
> 
> As you can hopefully see, there is a tradeoff between how much work you put 
> into wrapping up external libraries and how easy it is to then write code 
> against it.  If you only need to do something once, then it might be easier 
> to just hack something to talk to the typedefs.
> 
>  
> 
> Specific to PWAs, I am definitely not an expert on PWAs, but IMO, the link 
> posted was for an example of some of the related PWA APIs but didn’t really 
> produce anything Progressive.  Reading the MDN articles on PWAs was a bit 
> more informative, especially about the two places where the word 
> “Progressive” showed up, which was 1) providing progressively more 
> functionality based on device capability, and 2) progressively loading the 
> application.
> 
>  
> 
> I could argue that Flex and Royale already provide a way of creating PWAs, 
> but don’t use the new browser APIs.  AIR-based apps, for example, provide 
> offline capabilities.  Proper use of view states provide a different way of 
> managing what UI is presented to the users.  And modules provide a way to 
> progressively load your app.  What is missing might be capability detection, 
> although some of that may already be available by detecting OS or via some 
> Cordova libraries.
> 
>  
> 
> But if the goal is to leverage these new browser APIs in Royale, then it 
> comes down to picking the level of integration and creating any wrapping code 
> if desired.  It would be interesting to see if Royale view states and MXML 
> would make it much more efficient to create PWAs.  However, I don’t have the 
> time to work on that these days.
> 
>  
> 
> My 2 cents,
> 
> -Alex
> 
>  
> 
> From: Roman Isitua mailto:romanisi...@gmail.com>>
> Reply-To: "users@royale.apache.org <mailto:users@royale.apache.org>" 
> mailto:users@royale.apache.org>>
> Date: Monday, March 14, 2022 at 11:17 AM
> To: "users@royale.apache.org <mailto:users@royale.apache.org>" 
> mailto:users@royale.apache.org>>
> Subject: Re: Royale support for progressive web apps (pwa)
> 
>  
> 
> Yes. It should be in a similar section to where cordova is.
> 
>  
> 
> On Mon, 14 Mar 2022, 12:23 Andrew Wetmore,  <mailto:cottag...@gmail.com>> wrote:
> 
> Roman, when you get this sorted out, let's figure out where in the 
> documentation we should explain how to use Royale to create progressive web 
> apps. I presume it would go alongside explaining how to prepare a Royale app 
> for use with Cordova to achieve a similar goal.
> 
>  
> 
> a
> 
>  
> 
> On Mon, Mar 14, 2022 at 8:16 AM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> 
> One question.
> 
>  
> 
>  At which point in the code should the below actionscript code be added. Is 
> it in the sp:Application (assuming I am using spectrum) area ? I.e In the fx 
> script portion of the mxml ?
> 
>  
> 
> On Mon, 14 Mar 2022, 08:45 Roman Isitua,  <mailto:romanisi...@gmail.com>> wrote:
> 
> Wow ! I will definitely try this and provide an update on the outcome.
> 
>  
> 
> On Mon, 14 Mar 2022, 08:42 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> 
> Yes.
> 
>  
> 
> You can put that in a script tag in the html.
> 
>  
> 
> Here’s an ActionScript equivalent of that code:
> 
>  
> 
> if ("serviceWorker" in window.navigator) {
> 
>   window.addEventListener("load", function():void {
> 
> window.navigator.serviceWorker
> 
>   .register("/serviceWorker.js")
> 
>   .then(function(res):void{trace("service worker registered")})
> 
>   .catch(function(err):void{trace("service worker not registered: "+ 
> err)})
>

Re: Royale support for progressive web apps (pwa)

2022-03-14 Thread Harbs
I’d add it to the init stage of the application.

Actually, in ActionScript, you can get rid of the “load” event listener:

if ("serviceWorker" in window.navigator) {
  window.navigator.serviceWorker
.register("/serviceWorker.js")
.then(function(res):void{trace("service worker registered")})
.catch(function(err):void{trace("service worker not registered: "+ err)})
}



> On Mar 14, 2022, at 1:14 PM, Roman Isitua  wrote:
> 
> One question.
> 
>  At which point in the code should the below actionscript code be added. Is 
> it in the sp:Application (assuming I am using spectrum) area ? I.e In the fx 
> script portion of the mxml ?
> 
> On Mon, 14 Mar 2022, 08:45 Roman Isitua,  <mailto:romanisi...@gmail.com>> wrote:
> Wow ! I will definitely try this and provide an update on the outcome.
> 
> On Mon, 14 Mar 2022, 08:42 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> Yes.
> 
> You can put that in a script tag in the html.
> 
> Here’s an ActionScript equivalent of that code:
> 
> if ("serviceWorker" in window.navigator) {
>   window.addEventListener("load", function():void {
> window.navigator.serviceWorker
>   .register("/serviceWorker.js")
>   .then(function(res):void{trace("service worker registered")})
>   .catch(function(err):void{trace("service worker not registered: "+ 
> err)})
>   })
> }
> 
> If there’s no typedef support for serviceWorker you might need to use: 
> window.navigator[“serviceWorker”]
> 
>> On Mar 14, 2022, at 1:00 AM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> From the tutorial the code to register the service worker is as follows:
>> 
>> 
>> 
>> if ("serviceWorker" in navigator) {
>>   window.addEventListener("load", function() {
>> navigator.serviceWorker
>>   .register("/serviceWorker.js")
>>   .then(res => console.log("service worker registered"))
>>   .catch(err => console.log("service worker not registered", err))
>>   })
>> }
>> To implement the main entry point js file was modified. 
>> 
>> So your saying it possible to do same in the index.html or actionscript  ?
>> 
>> If yes my next question is how ?
>> 
>> On Sun, 13 Mar 2022, 20:19 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> If you want it to work offline with Cache, you will need a service worker, 
>> but that is a _SEPARATE_ js file. You don’t need to modify the main JS file.
>> 
>> You do need to register the service worker, but that can be done either in 
>> the index html file, or in your ActionScript code.
>> 
>>> On Mar 13, 2022, at 8:24 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> From the below link
>>> 
>>> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>>>  
>>> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
>>> 
>>> 
>>> The following steps are to be done to convert an app to pwa
>>> 1. Create a manifest.json  file.
>>> 
>>> 2. Modify the index.html file to reference the manifest.json.
>>> 
>>> 3. Implement a ServiceWorker.js file. This will be in the same root folder 
>>> as the generated main entry point js file.
>>> 
>>> 4. Register the ServiceWorker.js file by modifying for the generated entry 
>>> point js file.
>>> 
>>> 
>>> If I am coding my web app using plain html, css and javascript it will not 
>>> be a problem doing the above 4 tasks. But as I am using royale task three 
>>> and four look challenging. I think the royale sdk and compiler might need 
>>> to be tweaked to support those tasks.
>>> 
>>> On Sun, 13 Mar 2022, 19:04 Harbs, >> <mailto:harbs.li...@gmail.com>> wrote:
>>> No. Why would you need to modify the js file?
>>> 
>>>> On Mar 13, 2022, at 7:47 PM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> So I am free to modify the generated entry point js file as well ? 
>>>> 
>>>> This does not really look like an ideal solution because each time I 
>>>> recompile the project the generated js file will be overwritten. An ideal 
>>>> solution will be to add support for it in royale sdk.
>>>> 
>>>> 

Re: Royale support for progressive web apps (pwa)

2022-03-14 Thread Harbs
Yes.

You can put that in a script tag in the html.

Here’s an ActionScript equivalent of that code:

if ("serviceWorker" in window.navigator) {
  window.addEventListener("load", function():void {
window.navigator.serviceWorker
  .register("/serviceWorker.js")
  .then(function(res):void{trace("service worker registered")})
  .catch(function(err):void{trace("service worker not registered: "+ err)})
  })
}

If there’s no typedef support for serviceWorker you might need to use: 
window.navigator[“serviceWorker”]

> On Mar 14, 2022, at 1:00 AM, Roman Isitua  wrote:
> 
> From the tutorial the code to register the service worker is as follows:
> 
> 
> 
> if ("serviceWorker" in navigator) {
>   window.addEventListener("load", function() {
> navigator.serviceWorker
>   .register("/serviceWorker.js")
>   .then(res => console.log("service worker registered"))
>   .catch(err => console.log("service worker not registered", err))
>   })
> }
> To implement the main entry point js file was modified. 
> 
> So your saying it possible to do same in the index.html or actionscript  ?
> 
> If yes my next question is how ?
> 
> On Sun, 13 Mar 2022, 20:19 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> If you want it to work offline with Cache, you will need a service worker, 
> but that is a _SEPARATE_ js file. You don’t need to modify the main JS file.
> 
> You do need to register the service worker, but that can be done either in 
> the index html file, or in your ActionScript code.
> 
>> On Mar 13, 2022, at 8:24 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> From the below link
>> 
>> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>>  
>> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
>> 
>> 
>> The following steps are to be done to convert an app to pwa
>> 1. Create a manifest.json  file.
>> 
>> 2. Modify the index.html file to reference the manifest.json.
>> 
>> 3. Implement a ServiceWorker.js file. This will be in the same root folder 
>> as the generated main entry point js file.
>> 
>> 4. Register the ServiceWorker.js file by modifying for the generated entry 
>> point js file.
>> 
>> 
>> If I am coding my web app using plain html, css and javascript it will not 
>> be a problem doing the above 4 tasks. But as I am using royale task three 
>> and four look challenging. I think the royale sdk and compiler might need to 
>> be tweaked to support those tasks.
>> 
>> On Sun, 13 Mar 2022, 19:04 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> No. Why would you need to modify the js file?
>> 
>>> On Mar 13, 2022, at 7:47 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> So I am free to modify the generated entry point js file as well ? 
>>> 
>>> This does not really look like an ideal solution because each time I 
>>> recompile the project the generated js file will be overwritten. An ideal 
>>> solution will be to add support for it in royale sdk.
>>> 
>>> 
>>> 
>>> On Sun, 13 Mar 2022, 18:36 Harbs, >> <mailto:harbs.li...@gmail.com>> wrote:
>>> It shouldn’t be any different than a regular web app.
>>> 
>>> You can add whatever you want to the template index.html file.
>>> 
>>>> On Mar 12, 2022, at 11:53 AM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> I just stumbled on a tutorial on how to create a pwa app using plain html, 
>>>> javascript and css (i.e. no framework).
>>>> 
>>>>  I am now forced to ask the question. How can i do this in royale ?
>>>> 
>>>> Here is the link
>>>> 
>>>> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>>>>  
>>>> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
>>>> 
>>>> 
>>>> How can I register all the generated javascript files ?
>>>> 
>>>> Is modifying the main entry point js file in my royale project allowed ? 
>>>> From the tutorial this file will need to be modified to register the 
>>>> service worker.
>>>> 
>>>> 
>>>> Has someone created a pwa in royale before ?
>>>> 
>>>> 
>>>> Pwa's are rapidly being adopted it will be nice if I can package my 
>>>> responsive web application to be a pwa with little effort. 
>>>> 
>>>> 
>>>> Regards,
>>>> 
>>>> 
>>> 
>> 
> 



Re: Royale support for progressive web apps (pwa)

2022-03-13 Thread Harbs
IFAIK, the only thing that needs enhancing might be to make sure there’s 
typedef support for the worker APIs.

> On Mar 13, 2022, at 9:56 PM, Andrew Wetmore  wrote:
> 
> Is it worth enhancing Royale to support that out of the box?
> 
> On Sun, Mar 13, 2022 at 4:20 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
>> What is the gain of adding the .json file and all that?
> 
> 
> 1. You can make a web app look like a native mobile app.
> 2. It can work while your mobile device is off line (as long as you cache all 
> the necessary data).
> 
>> On Mar 13, 2022, at 9:18 PM, Andrew Wetmore > <mailto:cottag...@gmail.com>> wrote:
>> 
>> What is the gain of adding the .json file and all that? Doesn't a Royale app 
>> compiled for use with JS files run just fine without further modification on 
>> a web page?
>> 
>> On Sun, Mar 13, 2022 at 3:26 PM Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> From the below link
>> 
>> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>>  
>> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
>> 
>> 
>> The following steps are to be done to convert an app to pwa
>> 1. Create a manifest.json  file.
>> 
>> 2. Modify the index.html file to reference the manifest.json.
>> 
>> 3. Implement a ServiceWorker.js file. This will be in the same root folder 
>> as the generated main entry point js file.
>> 
>> 4. Register the ServiceWorker.js file by modifying for the generated entry 
>> point js file.
>> 
>> 
>> If I am coding my web app using plain html, css and javascript it will not 
>> be a problem doing the above 4 tasks. But as I am using royale task three 
>> and four look challenging. I think the royale sdk and compiler might need to 
>> be tweaked to support those tasks.
>> 
>> On Sun, 13 Mar 2022, 19:04 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> No. Why would you need to modify the js file?
>> 
>>> On Mar 13, 2022, at 7:47 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> So I am free to modify the generated entry point js file as well ? 
>>> 
>>> This does not really look like an ideal solution because each time I 
>>> recompile the project the generated js file will be overwritten. An ideal 
>>> solution will be to add support for it in royale sdk.
>>> 
>>> 
>>> 
>>> On Sun, 13 Mar 2022, 18:36 Harbs, >> <mailto:harbs.li...@gmail.com>> wrote:
>>> It shouldn’t be any different than a regular web app.
>>> 
>>> You can add whatever you want to the template index.html file.
>>> 
>>>> On Mar 12, 2022, at 11:53 AM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> I just stumbled on a tutorial on how to create a pwa app using plain html, 
>>>> javascript and css (i.e. no framework).
>>>> 
>>>>  I am now forced to ask the question. How can i do this in royale ?
>>>> 
>>>> Here is the link
>>>> 
>>>> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>>>>  
>>>> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
>>>> 
>>>> 
>>>> How can I register all the generated javascript files ?
>>>> 
>>>> Is modifying the main entry point js file in my royale project allowed ? 
>>>> From the tutorial this file will need to be modified to register the 
>>>> service worker.
>>>> 
>>>> 
>>>> Has someone created a pwa in royale before ?
>>>> 
>>>> 
>>>> Pwa's are rapidly being adopted it will be nice if I can package my 
>>>> responsive web application to be a pwa with little effort. 
>>>> 
>>>> 
>>>> Regards,
>>>> 
>>>> 
>>> 
>> 
>> 
>> 
>> -- 
>> Andrew Wetmore
>> 
>> Editor, Moose House Publications <https://moosehousepress.com/>
>> Editor-Writer, The Apache Software Foundation <https://apache.org/>
>> 
>> 
>> 
>> 
> 
> 
> 
> -- 
> Andrew Wetmore
> 
> Editor, Moose House Publications <https://moosehousepress.com/>
> Editor-Writer, The Apache Software Foundation <https://apache.org/>
> 
> 
> 
> 



Re: Royale support for progressive web apps (pwa)

2022-03-13 Thread Harbs
> What is the gain of adding the .json file and all that?


1. You can make a web app look like a native mobile app.
2. It can work while your mobile device is off line (as long as you cache all 
the necessary data).

> On Mar 13, 2022, at 9:18 PM, Andrew Wetmore  wrote:
> 
> What is the gain of adding the .json file and all that? Doesn't a Royale app 
> compiled for use with JS files run just fine without further modification on 
> a web page?
> 
> On Sun, Mar 13, 2022 at 3:26 PM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> From the below link
> 
> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>  
> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
> 
> 
> The following steps are to be done to convert an app to pwa
> 1. Create a manifest.json  file.
> 
> 2. Modify the index.html file to reference the manifest.json.
> 
> 3. Implement a ServiceWorker.js file. This will be in the same root folder as 
> the generated main entry point js file.
> 
> 4. Register the ServiceWorker.js file by modifying for the generated entry 
> point js file.
> 
> 
> If I am coding my web app using plain html, css and javascript it will not be 
> a problem doing the above 4 tasks. But as I am using royale task three and 
> four look challenging. I think the royale sdk and compiler might need to be 
> tweaked to support those tasks.
> 
> On Sun, 13 Mar 2022, 19:04 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> No. Why would you need to modify the js file?
> 
>> On Mar 13, 2022, at 7:47 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> So I am free to modify the generated entry point js file as well ? 
>> 
>> This does not really look like an ideal solution because each time I 
>> recompile the project the generated js file will be overwritten. An ideal 
>> solution will be to add support for it in royale sdk.
>> 
>> 
>> 
>> On Sun, 13 Mar 2022, 18:36 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> It shouldn’t be any different than a regular web app.
>> 
>> You can add whatever you want to the template index.html file.
>> 
>>> On Mar 12, 2022, at 11:53 AM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> I just stumbled on a tutorial on how to create a pwa app using plain html, 
>>> javascript and css (i.e. no framework).
>>> 
>>>  I am now forced to ask the question. How can i do this in royale ?
>>> 
>>> Here is the link
>>> 
>>> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>>>  
>>> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
>>> 
>>> 
>>> How can I register all the generated javascript files ?
>>> 
>>> Is modifying the main entry point js file in my royale project allowed ? 
>>> From the tutorial this file will need to be modified to register the 
>>> service worker.
>>> 
>>> 
>>> Has someone created a pwa in royale before ?
>>> 
>>> 
>>> Pwa's are rapidly being adopted it will be nice if I can package my 
>>> responsive web application to be a pwa with little effort. 
>>> 
>>> 
>>> Regards,
>>> 
>>> 
>> 
> 
> 
> 
> -- 
> Andrew Wetmore
> 
> Editor, Moose House Publications <https://moosehousepress.com/>
> Editor-Writer, The Apache Software Foundation <https://apache.org/>
> 
> 
> 
> 



Re: Royale support for progressive web apps (pwa)

2022-03-13 Thread Harbs
If you want it to work offline with Cache, you will need a service worker, but 
that is a _SEPARATE_ js file. You don’t need to modify the main JS file.

You do need to register the service worker, but that can be done either in the 
index html file, or in your ActionScript code.

> On Mar 13, 2022, at 8:24 PM, Roman Isitua  wrote:
> 
> From the below link
> 
> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>  
> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
> 
> 
> The following steps are to be done to convert an app to pwa
> 1. Create a manifest.json  file.
> 
> 2. Modify the index.html file to reference the manifest.json.
> 
> 3. Implement a ServiceWorker.js file. This will be in the same root folder as 
> the generated main entry point js file.
> 
> 4. Register the ServiceWorker.js file by modifying for the generated entry 
> point js file.
> 
> 
> If I am coding my web app using plain html, css and javascript it will not be 
> a problem doing the above 4 tasks. But as I am using royale task three and 
> four look challenging. I think the royale sdk and compiler might need to be 
> tweaked to support those tasks.
> 
> On Sun, 13 Mar 2022, 19:04 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> No. Why would you need to modify the js file?
> 
>> On Mar 13, 2022, at 7:47 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> So I am free to modify the generated entry point js file as well ? 
>> 
>> This does not really look like an ideal solution because each time I 
>> recompile the project the generated js file will be overwritten. An ideal 
>> solution will be to add support for it in royale sdk.
>> 
>> 
>> 
>> On Sun, 13 Mar 2022, 18:36 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> It shouldn’t be any different than a regular web app.
>> 
>> You can add whatever you want to the template index.html file.
>> 
>>> On Mar 12, 2022, at 11:53 AM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> I just stumbled on a tutorial on how to create a pwa app using plain html, 
>>> javascript and css (i.e. no framework).
>>> 
>>>  I am now forced to ask the question. How can i do this in royale ?
>>> 
>>> Here is the link
>>> 
>>> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>>>  
>>> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
>>> 
>>> 
>>> How can I register all the generated javascript files ?
>>> 
>>> Is modifying the main entry point js file in my royale project allowed ? 
>>> From the tutorial this file will need to be modified to register the 
>>> service worker.
>>> 
>>> 
>>> Has someone created a pwa in royale before ?
>>> 
>>> 
>>> Pwa's are rapidly being adopted it will be nice if I can package my 
>>> responsive web application to be a pwa with little effort. 
>>> 
>>> 
>>> Regards,
>>> 
>>> 
>> 
> 



Re: Royale support for progressive web apps (pwa)

2022-03-13 Thread Harbs
No. Why would you need to modify the js file?

> On Mar 13, 2022, at 7:47 PM, Roman Isitua  wrote:
> 
> So I am free to modify the generated entry point js file as well ? 
> 
> This does not really look like an ideal solution because each time I 
> recompile the project the generated js file will be overwritten. An ideal 
> solution will be to add support for it in royale sdk.
> 
> 
> 
> On Sun, 13 Mar 2022, 18:36 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> It shouldn’t be any different than a regular web app.
> 
> You can add whatever you want to the template index.html file.
> 
>> On Mar 12, 2022, at 11:53 AM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I just stumbled on a tutorial on how to create a pwa app using plain html, 
>> javascript and css (i.e. no framework).
>> 
>>  I am now forced to ask the question. How can i do this in royale ?
>> 
>> Here is the link
>> 
>> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>>  
>> <https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/>
>> 
>> 
>> How can I register all the generated javascript files ?
>> 
>> Is modifying the main entry point js file in my royale project allowed ? 
>> From the tutorial this file will need to be modified to register the service 
>> worker.
>> 
>> 
>> Has someone created a pwa in royale before ?
>> 
>> 
>> Pwa's are rapidly being adopted it will be nice if I can package my 
>> responsive web application to be a pwa with little effort. 
>> 
>> 
>> Regards,
>> 
>> 
> 



Re: Royale support for progressive web apps (pwa)

2022-03-13 Thread Harbs
It shouldn’t be any different than a regular web app.

You can add whatever you want to the template index.html file.

> On Mar 12, 2022, at 11:53 AM, Roman Isitua  wrote:
> 
> I just stumbled on a tutorial on how to create a pwa app using plain html, 
> javascript and css (i.e. no framework).
> 
>  I am now forced to ask the question. How can i do this in royale ?
> 
> Here is the link
> 
> https://www.google.com/amp/s/www.freecodecamp.org/news/build-a-pwa-from-scratch-with-html-css-and-javascript/amp/
>  
> 
> 
> 
> How can I register all the generated javascript files ?
> 
> Is modifying the main entry point js file in my royale project allowed ? From 
> the tutorial this file will need to be modified to register the service 
> worker.
> 
> 
> Has someone created a pwa in royale before ?
> 
> 
> Pwa's are rapidly being adopted it will be nice if I can package my 
> responsive web application to be a pwa with little effort. 
> 
> 
> Regards,
> 
> 



Re: Spectrum UI components

2022-02-28 Thread Harbs
Spectrum Menus are a bit non-standard when it comes to data. It expects an 
IMenuItem. If it’s a plain object, the text is set to the label or text 
property of the object and the rest of the menu properties are inferred as 
well. The original object is *replaced* with a MenuItem if the original is not 
an IMenuItem.

> We are using spectrum based on royale 0.9.8 with this commit id "024b730"
> 
> In other words we are not on version 0.9.9-snapshot?

You can cherry-pick the change.

> On Feb 28, 2022, at 10:44 AM, Roman Isitua  wrote:
> 
> Is there a label property ? That allows us to specify the field in our data 
> object to be used ?
> 
> 
> Also, How can we access this latest change ?
> 
> We are using spectrum based on royale 0.9.8 with this commit id "024b730"
> 
> In other words we are not on version 0.9.9-snapshot?
> 
> 
> 
> 
> 
> On Mon, 28 Feb 2022, 09:38 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
>> How can I use an arrayList of data objects instead ?
> 
>  dataProvider=“{myArrayListProvider}"/>
> 
>> The spectrum combobox also doesn't have a change attribute. How do you 
>> execute an event on selecting from the list.
> 
> It looks like we forgot to add Event metadata for that.
> Fixed. 
> https://github.com/unhurdle/spectrum-royale/commit/a53c16b59cc2b352adffbb570067e9fddcb9ec46
>  
> <https://github.com/unhurdle/spectrum-royale/commit/a53c16b59cc2b352adffbb570067e9fddcb9ec46>
>> On Feb 27, 2022, at 2:48 AM, Timothy Tokmang Wang > <mailto:timoshimm...@gmail.com>> wrote:
>> 
>> The spectrum combobox also doesn't have a change attribute. How do you 
>> execute an event on selecting from the list.
>> 
>> On Sun, Feb 27, 2022 at 12:28 AM Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> How can I populate a spectrum combo box dynamically ? I intend to use an 
>> array list of data objects ? 
>> 
>> For spectrum List (sp:List) the following can be used
>> 
>> >   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>> 
>>
>> 
>>
>> 
>>   
>> 
>> 
>> From the royale spectrum show case the code snippet was used.
>> 
>> 
>>   
>>   
>> 
>> 
>> 
>> 
>> 
>>   
>>   
>> 
>> 
>> 
>> In the above example a static fx array was used. How can I use an arrayList 
>> of data objects instead ?
>> 
>> 
>> 
>> On Wed, Jan 12, 2022 at 5:21 PM Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> Understood. Thanks.
>> 
>> On Wed, Jan 12, 2022 at 5:14 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> 
>> 
>>> On Jan 12, 2022, at 6:08 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> What is the purpose of ?  since it was no 
>>> longer necessary 
>> 
>> It’s necessary in Royale Basic to use ArrayLists.
>> 
>> In Spectrum, there’s a default ListModel which correctly handles both both 
>> Array and ArrayList data.
>> 
>>> 
>>> Also, another question
>>> which will you recommend one uses ? why should one choose Array over 
>>> ArrayList or ArrayList over Array.
>> 
>> Array is simpler. There’s less overhead. If you have data which doesn’t 
>> change, use Array.
>> If you need the list to update when data changes, use ArrayList.
> 



Re: Spectrum UI components

2022-02-28 Thread Harbs
> How can I use an arrayList of data objects instead ?



> The spectrum combobox also doesn't have a change attribute. How do you 
> execute an event on selecting from the list.

It looks like we forgot to add Event metadata for that.
Fixed. 
https://github.com/unhurdle/spectrum-royale/commit/a53c16b59cc2b352adffbb570067e9fddcb9ec46

> On Feb 27, 2022, at 2:48 AM, Timothy Tokmang Wang  
> wrote:
> 
> The spectrum combobox also doesn't have a change attribute. How do you 
> execute an event on selecting from the list.
> 
> On Sun, Feb 27, 2022 at 12:28 AM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> How can I populate a spectrum combo box dynamically ? I intend to use an 
> array list of data objects ? 
> 
> For spectrum List (sp:List) the following can be used
> 
>dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
> 
>
> 
>
> 
>   
> 
> 
> From the royale spectrum show case the code snippet was used.
> 
> 
>   
>   
> 
> 
> 
> 
> 
>   
>   
> 
> 
> 
> In the above example a static fx array was used. How can I use an arrayList 
> of data objects instead ?
> 
> 
> 
> On Wed, Jan 12, 2022 at 5:21 PM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> Understood. Thanks.
> 
> On Wed, Jan 12, 2022 at 5:14 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> 
> 
>> On Jan 12, 2022, at 6:08 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> What is the purpose of ?  since it was no 
>> longer necessary 
> 
> It’s necessary in Royale Basic to use ArrayLists.
> 
> In Spectrum, there’s a default ListModel which correctly handles both both 
> Array and ArrayList data.
> 
>> 
>> Also, another question
>> which will you recommend one uses ? why should one choose Array over 
>> ArrayList or ArrayList over Array.
> 
> Array is simpler. There’s less overhead. If you have data which doesn’t 
> change, use Array.
> If you need the list to update when data changes, use ArrayList.



Re: Talk on Royale

2022-01-26 Thread Harbs
Reaction was positive. Not sure I convinced anyone to switch, but the more word 
gets out, the better…

I added some comments to give a better picture of performance gains. Not sure 
why it’s not showing up.

Here’s what I added:

I did not do a very good demonstrating the performance benefits of Roylae in 
the talk. I put some better numbers together:

Minimal app
js 17KB gzipped
html 444 bytes unzipped
html 270 bytes gzipped
css ... depends on what you put there
load times:
95 ms document load event
100 ms onload event
109 ms for FP, FCP and LCP

So we’re talking less than 20KB of data TOTAL and about 100ms load time for a 
simple app.

Spectrum Browser
js 204 KB gzipped
html 5,632 bytes unzipped
html 863 bytes gzipped (with references to 64 external css files)
load times
275 ms FP FCP
281 ms doc load
330 ms LCP
343 ms onload

This easily beats Google’s optimal load times of less than 1/2 second. In fact 
you need to try VERY HARD to build a Royale app which takes longer than 1/2 
second to load.

Here’s a breakdown of the load time of the Spectrum Browser:
The bulk of the load time is due to the loading of Adobe’s Spectrum CSS. Some 
of things I’d like to do is add a Semantic-UI component set and create a 
tutorial on using Tailwind CSS with Royale. A build process which generates 
optimized external CSS would do wonders for load times...

The first 159 ms was evaluating css files. I’m loading 64 css files from Adobe, 
so that takes time. If I cared, this can probably be optimized a lot.

Evaluating and building html dom tree took 94 ms. Of that, evaluating the 
script took 65 ms. Not sure why that took so long.

The actual running of the code which builds the DOM took 27 ms.

Recalculate style took 20 ms. If I decided that was too long, I could delay 
loading some of the content pretty easily which would speed this up.

All in all, I don’t feel that a 204KB js file (with zero other dependencies) 
and a 300-350 ms load time is something that needs further optimization. If I 
did, Royale supports modules. I could probably use modules to cut down the JS 
size and the load times to less than half. Not worth it IMO.

Like I mentioned in the talk, switching routes generally takes about 20ms. 
That’s about a frame rate of about 60 fps to switch routes. That’s insanely 
fast if you stop to think about it...

I hope that does a better job of demonstrating the performance benefits of 
Royale.

> On Jan 26, 2022, at 9:11 AM, Yishay Weiss  wrote:
> 
> Nice presentation. Too bad there wasn’t a Q What was the reaction?
>  
> From: Harbs <mailto:harbs.li...@gmail.com>
> Sent: Tuesday, January 25, 2022 1:57 PM
> To: users@royale.apache.org <mailto:users@royale.apache.org>
> Subject: Talk on Royale
>  
> I recently gave a talk on Royale to a local group in Jerusalem. Please excuse 
> the poor delivery. I was recovering from Covid and a flu. ;-)
> 
> I went a bit into strands, beads and performance.
> 
> I used the router classes as an example of MXML and Royale features.
> 
> It might be of interest. There will be some colloquial terms you might not 
> recognize, but it should all be understandable...
> 
> https://www.youtube.com/watch?v=QWGISrmN4to 
> <https://www.youtube.com/watch?v=QWGISrmN4to>


Talk on Royale

2022-01-25 Thread Harbs
I recently gave a talk on Royale to a local group in Jerusalem. Please excuse 
the poor delivery. I was recovering from Covid and a flu. ;-)

I went a bit into strands, beads and performance.

I used the router classes as an example of MXML and Royale features.

It might be of interest. There will be some colloquial terms you might not 
recognize, but it should all be understandable...

https://www.youtube.com/watch?v=QWGISrmN4to




Re: Load time is very slow

2022-01-12 Thread Harbs
leapp\royalelogin\src\main\royale\App.mxml
>  
>  
> The release execution does not change, the error is the same as before (SDK 
> compilation from the develop branch):
>  
> Se produjo una excepción: ReferenceError: Error #1065: Variable 
> com.iest.winplusweb.models.MasterConfigSystemModel is not defined.
>   at yR (http://localhost:8080/WPWebRelease/App.js:3605:1771 
> <http://localhost:8080/WPWebRelease/App.js:3605:1771>)
> at Mya (http://localhost:8080/WPWebRelease/App.js:3343:365 
> <http://localhost:8080/WPWebRelease/App.js:3343:365>)
> at AR.J.usa (http://localhost:8080/WPWebRelease/App.js:434:441 
> <http://localhost:8080/WPWebRelease/App.js:434:441>)
> at GFa.J.fromTypeDefinition 
> (http://localhost:8080/WPWebRelease/App.js:5706:139 
> <http://localhost:8080/WPWebRelease/App.js:5706:139>)
> at Function.YT.getTypeDescriptor 
> (http://localhost:8080/WPWebRelease/App.js:4570:820 
> <http://localhost:8080/WPWebRelease/App.js:4570:820>)
> at Function.fX.constructBean 
> (http://localhost:8080/WPWebRelease/App.js:2336:472 
> <http://localhost:8080/WPWebRelease/App.js:2336:472>)
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 
> <http://localhost:8080/WPWebRelease/App.js:5041:66>)
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 
> <http://localhost:8080/WPWebRelease/App.js:950:452>)
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 
> <http://localhost:8080/WPWebRelease/App.js:951:454>)
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 
> <http://localhost:8080/WPWebRelease/App.js:357:549>)
>  
> The main difference:
> project compiled from "SDK-develop" runs fine in js-debug and gives error in 
> js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch 
> because of conversion error.
>  
> Hiedra
>  
> De: Roman Isitua mailto:romanisi...@gmail.com>> 
> Enviado el: martes, 28 de diciembre de 2021 15:55
> Para: users@royale.apache.org <mailto:users@royale.apache.org>
> Asunto: Re: Load time is very slow
>  
> @Harb
>  
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs 
> and compiler. I have rebuilt my application with modules in release mode.
>  
> I get the following error when I attempt to launch a module
>  
>  
> 
>  
>  
> The module loads fine in debug mode
>  
> 
>  
>  
> Snippets of the log
>  
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>  
>  
> I have attached the full log to this email.
>  
>  
>  
>  
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> Hi Maria,
>  
> Prior to starting this mail discussion "Load time is very slow". I can 
> confirm I have only been compiling in debug mode. My target\javascript\bin\ 
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 
> that I compiled in release mode.
>  
>  
>  
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve  <mailto:mjest...@iest.com>> wrote:
> Hi, @Roman, I think you are doing a double compile can it be? My times are 
> the same as yours and I always compile in debug and release.
>  
> Look at your target folder " target\javascript\bin\" and if you have two 
> folders: js-debug and js-release you are compiling always double.
>  
> In my case, the architecture of my project as well as the Maven compilation 
> files (pom.xml) were provided by an external company (we didn't know anything 
> about Maven or Royale at that time) and I understand that this formula was 
> chosen to show us the options we had.
>  
> A priori and without doing any test as Harb has done, I think that modularity 
> gives us the advantage of compiling parts of the code once and not compiling 
> them again if they are not modified. So far WITH MY COMPILATION TIMES, 
> sometimes more than 1 minute, this is fundamental. But of course, now we have 
> the 

Re: Compiling Modules (was Re: Load time is very slow)

2022-01-12 Thread Harbs
OK.

> On Jan 13, 2022, at 12:37 AM, Alex Harui  wrote:
> 
> The problem is that some output might look like this:
>  
> bar.Foo.prototype.ROYALE_CLASS_INFO = { name: “Foo”. qName: “bar.Foo” };
>  
> And the minifier will rename qName in the output differently in the main app 
> vs the module:
>  
> In the main app:
> bar.Foo..prototype.ROYALE_CLASS_INFO = { name: “Foo”. a: “bar.Foo” };
>  
> In a module:
> bar.Baz..prototype.ROYALE_CLASS_INFO = { name: “Baz”. c: “bar.Baz” };
>  
> Code that accesses someObj.ROYALE_CLASS_INFO.qName in the main app will do:
>  
> Var qName = someObj.ROYALE_CLASS_INFO.a;
>  
> And that won’t work for objects in the module that are using ‘c’ for QName.
>  
> If you turn on -js-dynamic-access-unknown-members when building the SWCs, 
> then these patterns in the SWC will look like:
>  
> bar.Foo.prototype.ROYALE_CLASS_INFO = { name: “Foo”. ‘qName’: “bar.Foo” };
>  
> But then every user of the SWC will never get qName renamed, which wastes 
> bytes.  So I think we want to not use -js-dynamic-access-unknown-members when 
> building SWCs.
>  
> So the -prevent-rename-object-keys option I added is only turned on for 
> certain keys when building a module or a main app that loads a module.  For 
> the simple Module example, we only needed to prevent renaming of the 
> following keys:
> cssData, _bindings, ROYALE_CLASS_INFO, superClass_, qName
>  
> The Royale compiler copies JS files from the SWCs to bin/js-debug.  What this 
> option does is filter each file as it is copied, modifying the code for the 
> keys.  We’re already scanning every line in those files anyway in 
> GoogDepsWriter.  That way folks not building apps with modules get maximum 
> renaming and only those needing to prevent renaming in their output can 
> prevent that renaming.
>  
> We’ll see if that holds up well for Roman.  There was some additional hacking 
> in the compiler since superclass_ is in base.js and not in our SWCs, so that 
> file and key was special cased.  Will there be more?  Also I special cased 
> Language.is/as/closure <http://language.is/as/closure> as they are not 
> unknown members but are not exported and can be renamed in most apps but need 
> to not be renamed for module and apps loading modules.
>  
> You might find it useful to shave off a few bytes in your app where you don’t 
> really want ALL unknown members to not be renamed.  This option can let you 
> specify just the list of members that matter.
>  
> HTH,
> -Alex
>  
>  
> From: Harbs 
> Reply-To: "users@royale.apache.org" 
> Date: Wednesday, January 12, 2022 at 2:13 PM
> To: "users@royale.apache.org" 
> Subject: Re: Compiling Modules (was Re: Load time is very slow)
>  
> Didn’t totally grok what you said.
>  
> Can you give a practical difference in when it would be used?
> 
> 
>> On Jan 12, 2022, at 7:39 PM, Alex Harui > <mailto:aha...@adobe.com>> wrote:
>>  
>> The option I added takes a list of members and post-processes.  I think all 
>> other options change what is output during the compilation and 
>> -js-dynamic-access-unknown-members doesn’t take a list of members.
>>  
>> -Alex
>>  
>> From: Harbs mailto:harbs.li...@gmail.com>>
>> Reply-To: "users@royale.apache.org <mailto:users@royale.apache.org>" 
>> mailto:users@royale.apache.org>>
>> Date: Wednesday, January 12, 2022 at 2:30 AM
>> To: "users@royale.apache.org <mailto:users@royale.apache.org>" 
>> mailto:users@royale.apache.org>>
>> Subject: Re: Compiling Modules (was Re: Load time is very slow)
>>  
>> How is this different than -js-dynamic-access-unknown-members?
>> 
>> 
>> 
>>> On Jan 12, 2022, at 10:04 AM, Alex Harui >> <mailto:aha...@adobe.com>> wrote:
>>>  
>>>  I added a -prevent-rename-object-keys compiler option that works as a 
>>> post-processor.  It scans the js files being copied into bin/js-debug and 
>>> adds quotes around things.



Re: Compiling Modules (was Re: Load time is very slow)

2022-01-12 Thread Harbs
Didn’t totally grok what you said.

Can you give a practical difference in when it would be used?

> On Jan 12, 2022, at 7:39 PM, Alex Harui  wrote:
> 
> The option I added takes a list of members and post-processes.  I think all 
> other options change what is output during the compilation and 
> -js-dynamic-access-unknown-members doesn’t take a list of members.
>  
> -Alex
>  
> From: Harbs 
> Reply-To: "users@royale.apache.org" 
> Date: Wednesday, January 12, 2022 at 2:30 AM
> To: "users@royale.apache.org" 
> Subject: Re: Compiling Modules (was Re: Load time is very slow)
>  
> How is this different than -js-dynamic-access-unknown-members?
> 
> 
>> On Jan 12, 2022, at 10:04 AM, Alex Harui > <mailto:aha...@adobe.com>> wrote:
>>  
>>  I added a -prevent-rename-object-keys compiler option that works as a 
>> post-processor.  It scans the js files being copied into bin/js-debug and 
>> adds quotes around things.



Re: Spectrum UI components

2022-01-12 Thread Harbs


> On Jan 12, 2022, at 6:08 PM, Roman Isitua  wrote:
> 
> What is the purpose of ?  since it was no 
> longer necessary 

It’s necessary in Royale Basic to use ArrayLists.

In Spectrum, there’s a default ListModel which correctly handles both both 
Array and ArrayList data.

> 
> Also, another question
> which will you recommend one uses ? why should one choose Array over 
> ArrayList or ArrayList over Array.

Array is simpler. There’s less overhead. If you have data which doesn’t change, 
use Array.
If you need the list to update when data changes, use ArrayList.

Re: Spectrum UI components

2022-01-12 Thread Harbs
Yeah. You probably need these:

   (handles modifying single items to the 
ArrayList)
   (handles removeAll())


> On Jan 12, 2022, at 5:23 PM, Roman Isitua  wrote:
> 
> The base component for the mxml is a FlexContainer.
> 
> I have attached it to this mail. You can have a look.
> 
> 
> On Wed, Jan 12, 2022 at 4:19 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> How are you assigning the ArrayList? What’s the base component for the MXML?
> 
> You might need to add ContainerDataBinding.
> 
>> On Jan 12, 2022, at 5:08 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I have tested it again. No errors.
>> 
>> 
>> 
>> On Wed, Jan 12, 2022 at 3:54 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> Do you get an error of some kind?
>> 
>>> On Jan 12, 2022, at 4:29 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> Sorry, what I meant to say is that the arrayList does not render.
>>> 
>>> For example when I use Array as follows
>>> 
>>>   
>>>  
>>>   
>>>   >> labelField="description" dataProvider="{menuItemList}" 
>>>change="onSelectMenu(event)"/>
>>>
>>>   
>>> 
>>> The side menu renders
>>> 
>>> 
>>> 
>>> 
>>> However, when I use array List as follows
>>> 
>>>   
>>>  
>>>   
>>>   >> labelField="description" 
>>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>>
>>>
>>>
>>> 
>>>   
>>>
>>>   
>>> 
>>> 
>>> it does not render. see Below
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Wed, Jan 12, 2022 at 3:18 PM Harbs >> <mailto:harbs.li...@gmail.com>> wrote:
>>>>  It's not working.
>>> 
>>> What’s not working?
>>> 
>>>> Did I apply it correctly ?
>>> 
>>> Looks like it.
>>> 
>>>> Another question, which one do you use for your apps in production ?
>>> 
>>> I usually use Arrays. The css code was copied from one of my apps which 
>>> uses an ArrayList in a Spectrum List..
>>> 
>>>> On Jan 12, 2022, at 4:00 PM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> I have attempted the second approach. It's not working. I am not sure I am 
>>>> applying it correctly. See how I defined it.
>>>> 
>>>> 
>>>> 
>>>> 
>>>>  
>>>>   
>>>>   >>> labelField="description" 
>>>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>>>
>>>>
>>>>
>>>> 
>>>>   
>>>>
>>>>   
>>>> 
>>>> 
>>>> Note: in the commented out code above, I supplied an array. It works fine. 
>>>> 
>>>> Did I apply it correctly ?
>>>> 
>>>> Another question, which one do you use for your apps in production ?
>>>> 
>>>> 
>>>> On Wed, Jan 12, 2022 at 2:09 PM Harbs >>> <mailto:harbs.li...@gmail.com>> wrote:
>>>> Any one of those three should work.
>>>> 
>>>>> On Jan 12, 2022, at 3:09 PM, Harbs >>>> <mailto:harbs.li...@gmail.com>> wrote:
>>>>> 
>>>>> CSS:
>>>>> #uploadsList{
>>>>>   IBeadModel: 
>>>>> ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
>>>>>   IDataProviderItemRendererMapper: 
>>>>> ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
>>>>> }
>>>>> 
>>>>> MXML:
>>>>>   
>>>>> 
>>>>> 
>>>>>   
>>>>> 
>>>>> ActionScript:
>>>>>   addBead(new ArrayListSelectionModel());
>>>>>   addBead(new DataItemRendererFactoryForArrayList());
>>>>> 
>>

Re: Spectrum UI components

2022-01-12 Thread Harbs
Also:

If you need the list to dynamically update itself you might need 
EasyDataProviderChangeNotifier like I have below.

> On Jan 12, 2022, at 5:19 PM, Harbs  wrote:
> 
> How are you assigning the ArrayList? What’s the base component for the MXML?
> 
> You might need to add ContainerDataBinding.
> 
>> On Jan 12, 2022, at 5:08 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I have tested it again. No errors.
>> 
>> 
>> 
>> On Wed, Jan 12, 2022 at 3:54 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> Do you get an error of some kind?
>> 
>>> On Jan 12, 2022, at 4:29 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> Sorry, what I meant to say is that the arrayList does not render.
>>> 
>>> For example when I use Array as follows
>>> 
>>>   
>>>  
>>>   
>>>   >> labelField="description" dataProvider="{menuItemList}" 
>>>change="onSelectMenu(event)"/>
>>>
>>>   
>>> 
>>> The side menu renders
>>> 
>>> 
>>> 
>>> 
>>> However, when I use array List as follows
>>> 
>>>   
>>>  
>>>   
>>>   >> labelField="description" 
>>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>>
>>>
>>>
>>> 
>>>   
>>>
>>>   
>>> 
>>> 
>>> it does not render. see Below
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> On Wed, Jan 12, 2022 at 3:18 PM Harbs >> <mailto:harbs.li...@gmail.com>> wrote:
>>>>  It's not working.
>>> 
>>> What’s not working?
>>> 
>>>> Did I apply it correctly ?
>>> 
>>> Looks like it.
>>> 
>>>> Another question, which one do you use for your apps in production ?
>>> 
>>> I usually use Arrays. The css code was copied from one of my apps which 
>>> uses an ArrayList in a Spectrum List..
>>> 
>>>> On Jan 12, 2022, at 4:00 PM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> I have attempted the second approach. It's not working. I am not sure I am 
>>>> applying it correctly. See how I defined it.
>>>> 
>>>> 
>>>> 
>>>> 
>>>>  
>>>>   
>>>>   >>> labelField="description" 
>>>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>>>
>>>>
>>>>
>>>> 
>>>>   
>>>>
>>>>   
>>>> 
>>>> 
>>>> Note: in the commented out code above, I supplied an array. It works fine. 
>>>> 
>>>> Did I apply it correctly ?
>>>> 
>>>> Another question, which one do you use for your apps in production ?
>>>> 
>>>> 
>>>> On Wed, Jan 12, 2022 at 2:09 PM Harbs >>> <mailto:harbs.li...@gmail.com>> wrote:
>>>> Any one of those three should work.
>>>> 
>>>>> On Jan 12, 2022, at 3:09 PM, Harbs >>>> <mailto:harbs.li...@gmail.com>> wrote:
>>>>> 
>>>>> CSS:
>>>>> #uploadsList{
>>>>>   IBeadModel: 
>>>>> ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
>>>>>   IDataProviderItemRendererMapper: 
>>>>> ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
>>>>> }
>>>>> 
>>>>> MXML:
>>>>>   
>>>>> 
>>>>> 
>>>>>   
>>>>> 
>>>>> ActionScript:
>>>>>   addBead(new ArrayListSelectionModel());
>>>>>   addBead(new DataItemRendererFactoryForArrayList());
>>>>> 
>>>>>> On Jan 12,

Re: Spectrum UI components

2022-01-12 Thread Harbs
How are you assigning the ArrayList? What’s the base component for the MXML?

You might need to add ContainerDataBinding.

> On Jan 12, 2022, at 5:08 PM, Roman Isitua  wrote:
> 
> I have tested it again. No errors.
> 
> 
> 
> On Wed, Jan 12, 2022 at 3:54 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> Do you get an error of some kind?
> 
>> On Jan 12, 2022, at 4:29 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> Sorry, what I meant to say is that the arrayList does not render.
>> 
>> For example when I use Array as follows
>> 
>>   
>>  
>>   
>>   > labelField="description" dataProvider="{menuItemList}" 
>>change="onSelectMenu(event)"/>
>>
>>   
>> 
>> The side menu renders
>> 
>> 
>> 
>> 
>> However, when I use array List as follows
>> 
>>   
>>  
>>   
>>   > labelField="description" 
>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>
>>
>>
>> 
>>   
>>
>>   
>> 
>> 
>> it does not render. see Below
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> On Wed, Jan 12, 2022 at 3:18 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>>>  It's not working.
>> 
>> What’s not working?
>> 
>>> Did I apply it correctly ?
>> 
>> Looks like it.
>> 
>>> Another question, which one do you use for your apps in production ?
>> 
>> I usually use Arrays. The css code was copied from one of my apps which uses 
>> an ArrayList in a Spectrum List..
>> 
>>> On Jan 12, 2022, at 4:00 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> I have attempted the second approach. It's not working. I am not sure I am 
>>> applying it correctly. See how I defined it.
>>> 
>>> 
>>> 
>>> 
>>>  
>>>   
>>>   >> labelField="description" 
>>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>>
>>>
>>>
>>> 
>>>   
>>>
>>>   
>>> 
>>> 
>>> Note: in the commented out code above, I supplied an array. It works fine. 
>>> 
>>> Did I apply it correctly ?
>>> 
>>> Another question, which one do you use for your apps in production ?
>>> 
>>> 
>>> On Wed, Jan 12, 2022 at 2:09 PM Harbs >> <mailto:harbs.li...@gmail.com>> wrote:
>>> Any one of those three should work.
>>> 
>>>> On Jan 12, 2022, at 3:09 PM, Harbs >>> <mailto:harbs.li...@gmail.com>> wrote:
>>>> 
>>>> CSS:
>>>> #uploadsList{
>>>>   IBeadModel: 
>>>> ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
>>>>   IDataProviderItemRendererMapper: 
>>>> ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
>>>> }
>>>> 
>>>> MXML:
>>>>   
>>>> 
>>>> 
>>>>   
>>>> 
>>>> ActionScript:
>>>>   addBead(new ArrayListSelectionModel());
>>>>   addBead(new DataItemRendererFactoryForArrayList());
>>>> 
>>>>> On Jan 12, 2022, at 2:44 PM, Roman Isitua >>>> <mailto:romanisi...@gmail.com>> wrote:
>>>>> 
>>>>> How can this be applied let say for example on an sp:List ? As a bead ?
>>>>> 
>>>>>  Let's say I want to use arrayList  as data provider. 
>>>>> 
>>>>> 
>>>>> On Wed, 12 Jan 2022, 13:41 Harbs, >>>> <mailto:harbs.li...@gmail.com>> wrote:
>>>>> Yes.The default IDataProviderItemRendererMapper is 
>>>>> DataItemRendererFactoryForArrayData.
>>>>> 
>>>>> If you are using collections you should use 
>>>>> DataItemRendererFactoryForArrayList or 

Re: Spectrum UI components

2022-01-12 Thread Harbs
Do you get an error of some kind?

> On Jan 12, 2022, at 4:29 PM, Roman Isitua  wrote:
> 
> Sorry, what I meant to say is that the arrayList does not render.
> 
> For example when I use Array as follows
> 
>   
>  
>   
>labelField="description" dataProvider="{menuItemList}" 
>change="onSelectMenu(event)"/>
>
>   
> 
> The side menu renders
> 
> 
> 
> 
> However, when I use array List as follows
> 
>   
>  
>   
>labelField="description" 
>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>
>    
>
> 
>   
>
>   
> 
> 
> it does not render. see Below
> 
> 
> 
> 
> 
> 
> 
> On Wed, Jan 12, 2022 at 3:18 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
>>  It's not working.
> 
> What’s not working?
> 
>> Did I apply it correctly ?
> 
> Looks like it.
> 
>> Another question, which one do you use for your apps in production ?
> 
> I usually use Arrays. The css code was copied from one of my apps which uses 
> an ArrayList in a Spectrum List..
> 
>> On Jan 12, 2022, at 4:00 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I have attempted the second approach. It's not working. I am not sure I am 
>> applying it correctly. See how I defined it.
>> 
>> 
>> 
>> 
>>  
>>   
>>   > labelField="description" 
>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>
>>
>>
>> 
>>   
>>
>>   
>> 
>> 
>> Note: in the commented out code above, I supplied an array. It works fine. 
>> 
>> Did I apply it correctly ?
>> 
>> Another question, which one do you use for your apps in production ?
>> 
>> 
>> On Wed, Jan 12, 2022 at 2:09 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> Any one of those three should work.
>> 
>>> On Jan 12, 2022, at 3:09 PM, Harbs >> <mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>> CSS:
>>> #uploadsList{
>>>   IBeadModel: 
>>> ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
>>>   IDataProviderItemRendererMapper: 
>>> ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
>>> }
>>> 
>>> MXML:
>>>   
>>> 
>>> 
>>>   
>>> 
>>> ActionScript:
>>>   addBead(new ArrayListSelectionModel());
>>>   addBead(new DataItemRendererFactoryForArrayList());
>>> 
>>>> On Jan 12, 2022, at 2:44 PM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> How can this be applied let say for example on an sp:List ? As a bead ?
>>>> 
>>>>  Let's say I want to use arrayList  as data provider. 
>>>> 
>>>> 
>>>> On Wed, 12 Jan 2022, 13:41 Harbs, >>> <mailto:harbs.li...@gmail.com>> wrote:
>>>> Yes.The default IDataProviderItemRendererMapper is 
>>>> DataItemRendererFactoryForArrayData.
>>>> 
>>>> If you are using collections you should use 
>>>> DataItemRendererFactoryForArrayList or 
>>>> DataItemRendererFactoryForCollectionView instead.
>>>> 
>>>> HTH,
>>>> Harbs
>>>> 
>>>>> On Jan 12, 2022, at 1:35 PM, Roman Isitua >>>> <mailto:romanisi...@gmail.com>> wrote:
>>>>> 
>>>>> Hence the reason, I need to confirm from Harbs the array data type that 
>>>>> is supported in spectrum.
>>>>> 
>>>>> 
>>>>> 
>>>>> On Tue, 11 Jan 2022, 21:33 Maria Jose Esteve, >>>> <mailto:mjest...@iest.com>> wrote:
>>>>> Hi,
>>>>> 
>>>>> From what I see in the "ListModel.as" code it allows Object, IArray and 
>>>>> IArrayList.
>>>>> 
>>>>>  
>>>>> 
>>>>> Hiedra
>>>>> 
>>>>>  
>>>>> 
>>>>> De: Roman Isitua mailto:romanisi...@gmail.com>> 
>>>>> Enviado el: martes, 11 de enero de 2022 20:40
>>&

Re: Spectrum UI components

2022-01-12 Thread Harbs
Here’s the list of beads I’m using for a Spectrum List elsewhere (you don’t 
necessarily need ArrayListSelectionModel):


  
  
  
  
  



> On Jan 12, 2022, at 4:18 PM, Harbs  wrote:
> 
>>  It's not working.
> 
> What’s not working?
> 
>> Did I apply it correctly ?
> 
> Looks like it.
> 
>> Another question, which one do you use for your apps in production ?
> 
> I usually use Arrays. The css code was copied from one of my apps which uses 
> an ArrayList in a Spectrum List..
> 
>> On Jan 12, 2022, at 4:00 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I have attempted the second approach. It's not working. I am not sure I am 
>> applying it correctly. See how I defined it.
>> 
>> 
>> 
>> 
>>  
>>   
>>   > labelField="description" 
>>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>>
>>
>>
>> 
>>   
>>
>>   
>> 
>> 
>> Note: in the commented out code above, I supplied an array. It works fine. 
>> 
>> Did I apply it correctly ?
>> 
>> Another question, which one do you use for your apps in production ?
>> 
>> 
>> On Wed, Jan 12, 2022 at 2:09 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> Any one of those three should work.
>> 
>>> On Jan 12, 2022, at 3:09 PM, Harbs >> <mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>> CSS:
>>> #uploadsList{
>>>   IBeadModel: 
>>> ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
>>>   IDataProviderItemRendererMapper: 
>>> ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
>>> }
>>> 
>>> MXML:
>>>   
>>> 
>>> 
>>>   
>>> 
>>> ActionScript:
>>>   addBead(new ArrayListSelectionModel());
>>>   addBead(new DataItemRendererFactoryForArrayList());
>>> 
>>>> On Jan 12, 2022, at 2:44 PM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> How can this be applied let say for example on an sp:List ? As a bead ?
>>>> 
>>>>  Let's say I want to use arrayList  as data provider. 
>>>> 
>>>> 
>>>> On Wed, 12 Jan 2022, 13:41 Harbs, >>> <mailto:harbs.li...@gmail.com>> wrote:
>>>> Yes.The default IDataProviderItemRendererMapper is 
>>>> DataItemRendererFactoryForArrayData.
>>>> 
>>>> If you are using collections you should use 
>>>> DataItemRendererFactoryForArrayList or 
>>>> DataItemRendererFactoryForCollectionView instead.
>>>> 
>>>> HTH,
>>>> Harbs
>>>> 
>>>>> On Jan 12, 2022, at 1:35 PM, Roman Isitua >>>> <mailto:romanisi...@gmail.com>> wrote:
>>>>> 
>>>>> Hence the reason, I need to confirm from Harbs the array data type that 
>>>>> is supported in spectrum.
>>>>> 
>>>>> 
>>>>> 
>>>>> On Tue, 11 Jan 2022, 21:33 Maria Jose Esteve, >>>> <mailto:mjest...@iest.com>> wrote:
>>>>> Hi,
>>>>> 
>>>>> From what I see in the "ListModel.as" code it allows Object, IArray and 
>>>>> IArrayList.
>>>>> 
>>>>>  
>>>>> 
>>>>> Hiedra
>>>>> 
>>>>>  
>>>>> 
>>>>> De: Roman Isitua mailto:romanisi...@gmail.com>> 
>>>>> Enviado el: martes, 11 de enero de 2022 20:40
>>>>> Para: users@royale.apache.org <mailto:users@royale.apache.org>
>>>>> Asunto: Re: Spectrum UI components
>>>>> 
>>>>>  
>>>>> 
>>>>> It is now displaying. The issue was not related to the sp:List as I 
>>>>> initially thought.
>>>>> 
>>>>>  
>>>>> 
>>>>>  
>>>>> 
>>>>>  
>>>>> 
>>>>> 
>>>>> 
>>>>>  
>>>>> 
>>>>> 
>>>>> 
>>>>>   
>>>>> 
>>>>> 
>>>>> 
>>>>>  
>>>>> 
>>>>>  
>>>

Re: Spectrum UI components

2022-01-12 Thread Harbs
>  It's not working.

What’s not working?

> Did I apply it correctly ?

Looks like it.

> Another question, which one do you use for your apps in production ?

I usually use Arrays. The css code was copied from one of my apps which uses an 
ArrayList in a Spectrum List..

> On Jan 12, 2022, at 4:00 PM, Roman Isitua  wrote:
> 
> I have attempted the second approach. It's not working. I am not sure I am 
> applying it correctly. See how I defined it.
> 
> 
> 
> 
>  
>   
>labelField="description" 
>   dataProvider="{newMenuItemList}" change="onSelectMenu(event)">
>
>
>
> 
>   
>
>   
> 
> 
> Note: in the commented out code above, I supplied an array. It works fine. 
> 
> Did I apply it correctly ?
> 
> Another question, which one do you use for your apps in production ?
> 
> 
> On Wed, Jan 12, 2022 at 2:09 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> Any one of those three should work.
> 
>> On Jan 12, 2022, at 3:09 PM, Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> 
>> CSS:
>> #uploadsList{
>>   IBeadModel: 
>> ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
>>   IDataProviderItemRendererMapper: 
>> ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
>> }
>> 
>> MXML:
>>   
>> 
>> 
>>   
>> 
>> ActionScript:
>>   addBead(new ArrayListSelectionModel());
>>   addBead(new DataItemRendererFactoryForArrayList());
>> 
>>> On Jan 12, 2022, at 2:44 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> How can this be applied let say for example on an sp:List ? As a bead ?
>>> 
>>>  Let's say I want to use arrayList  as data provider. 
>>> 
>>> 
>>> On Wed, 12 Jan 2022, 13:41 Harbs, >> <mailto:harbs.li...@gmail.com>> wrote:
>>> Yes.The default IDataProviderItemRendererMapper is 
>>> DataItemRendererFactoryForArrayData.
>>> 
>>> If you are using collections you should use 
>>> DataItemRendererFactoryForArrayList or 
>>> DataItemRendererFactoryForCollectionView instead.
>>> 
>>> HTH,
>>> Harbs
>>> 
>>>> On Jan 12, 2022, at 1:35 PM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> Hence the reason, I need to confirm from Harbs the array data type that is 
>>>> supported in spectrum.
>>>> 
>>>> 
>>>> 
>>>> On Tue, 11 Jan 2022, 21:33 Maria Jose Esteve, >>> <mailto:mjest...@iest.com>> wrote:
>>>> Hi,
>>>> 
>>>> From what I see in the "ListModel.as" code it allows Object, IArray and 
>>>> IArrayList.
>>>> 
>>>>  
>>>> 
>>>> Hiedra
>>>> 
>>>>  
>>>> 
>>>> De: Roman Isitua mailto:romanisi...@gmail.com>> 
>>>> Enviado el: martes, 11 de enero de 2022 20:40
>>>> Para: users@royale.apache.org <mailto:users@royale.apache.org>
>>>> Asunto: Re: Spectrum UI components
>>>> 
>>>>  
>>>> 
>>>> It is now displaying. The issue was not related to the sp:List as I 
>>>> initially thought.
>>>> 
>>>>  
>>>> 
>>>>  
>>>> 
>>>>  
>>>> 
>>>> 
>>>> 
>>>>  
>>>> 
>>>> 
>>>> 
>>>>   
>>>> 
>>>> 
>>>> 
>>>>  
>>>> 
>>>>  
>>>> 
>>>> 
>>>> 
>>>>  
>>>> 
>>>>   
>>>> 
>>>>   >>> labelField="description" dataProvider="{menuItemList}"
>>>> 
>>>>change="onSelectMenu(event)"/>
>>>> 
>>>>   
>>>> 
>>>>   
>>>> 
>>>>  
>>>> 
>>>>
>>>> 
>>>>   
>>>> 
>>>>
>>>> 
>>>>  
>>>> 
>>>>  
>>>> 
>>>>  
>>>> 
>>>> 
>>>> 
>>>>  
>>>> 
>>>>  
&

Re: Spectrum UI components

2022-01-12 Thread Harbs
Any one of those three should work.

> On Jan 12, 2022, at 3:09 PM, Harbs  wrote:
> 
> CSS:
> #uploadsList{
>   IBeadModel: 
> ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
>   IDataProviderItemRendererMapper: 
> ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
> }
> 
> MXML:
>   
> 
> 
>   
> 
> ActionScript:
>   addBead(new ArrayListSelectionModel());
>   addBead(new DataItemRendererFactoryForArrayList());
> 
>> On Jan 12, 2022, at 2:44 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> How can this be applied let say for example on an sp:List ? As a bead ?
>> 
>>  Let's say I want to use arrayList  as data provider. 
>> 
>> 
>> On Wed, 12 Jan 2022, 13:41 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> Yes.The default IDataProviderItemRendererMapper is 
>> DataItemRendererFactoryForArrayData.
>> 
>> If you are using collections you should use 
>> DataItemRendererFactoryForArrayList or 
>> DataItemRendererFactoryForCollectionView instead.
>> 
>> HTH,
>> Harbs
>> 
>>> On Jan 12, 2022, at 1:35 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> Hence the reason, I need to confirm from Harbs the array data type that is 
>>> supported in spectrum.
>>> 
>>> 
>>> 
>>> On Tue, 11 Jan 2022, 21:33 Maria Jose Esteve, >> <mailto:mjest...@iest.com>> wrote:
>>> Hi,
>>> 
>>> From what I see in the "ListModel.as" code it allows Object, IArray and 
>>> IArrayList.
>>> 
>>>  
>>> 
>>> Hiedra
>>> 
>>>  
>>> 
>>> De: Roman Isitua mailto:romanisi...@gmail.com>> 
>>> Enviado el: martes, 11 de enero de 2022 20:40
>>> Para: users@royale.apache.org <mailto:users@royale.apache.org>
>>> Asunto: Re: Spectrum UI components
>>> 
>>>  
>>> 
>>> It is now displaying. The issue was not related to the sp:List as I 
>>> initially thought.
>>> 
>>>  
>>> 
>>>  
>>> 
>>>  
>>> 
>>> 
>>> 
>>>  
>>> 
>>> 
>>> 
>>>   
>>> 
>>> 
>>> 
>>>  
>>> 
>>>  
>>> 
>>> 
>>> 
>>>  
>>> 
>>>   
>>> 
>>>   >> labelField="description" dataProvider="{menuItemList}"
>>> 
>>>change="onSelectMenu(event)"/>
>>> 
>>>   
>>> 
>>>   
>>> 
>>>  
>>> 
>>>
>>> 
>>>   
>>> 
>>>
>>> 
>>>  
>>> 
>>>  
>>> 
>>>  
>>> 
>>> 
>>> 
>>>  
>>> 
>>>  
>>> 
>>>  
>>> 
>>>  
>>> 
>>> I changed the parent component from flex container to group. Though that 
>>> had nothing to do  with the issue I was having.
>>> 
>>>  
>>> 
>>> My current question 
>>> 
>>>  
>>> 
>>> is Array data type the only collection class that is supported in spectrum 
>>> ? 
>>> 
>>>  
>>> 
>>>  
>>> 
>>> On Tue, Jan 11, 2022 at 6:30 PM Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> Hi,
>>> 
>>>  
>>> 
>>> I am trying to populate my first List  for some reason it is not 
>>> being populated. Here is my code snippet.
>>> 
>>>  
>>> 
>>> 
>>> 
>>>   
>>> 
>>> 
>>> 
>>>  
>>> 
>>>  
>>> 
>>>   
>>> 
>>>  
>>> 
>>>   
>>> 
>>>   >> dataProvider="{newMenuItemList}"
>>> 
>>>   labelField="description" change="onSelectMenu(event)"/>
>>> 
>>>   
>>> 
>>>  
>>> 
>>>   
>>> 
>>>  
>>> 
>>>  
>>> 
>>> I have the following questions
>>> 
>>> 1. what is the expected data provider ? Array, or 
>>> org.apache.royale.collections.ArrayList ? 
>>> 
>>> I have tried both none of them works.
>>> 
>>>  
>>> 
>>> 2.  Did I register data binding correctly ? 
>>> 
>>> The above ui is wrapped by a FlexContainer.
>>> 
>>>  
>>> 
>>> my data source is supposed to be an arrayList of data transfer objects 
>>> (MenuItemDTO) with get set functions for each field.
>>> 
>>>  
>>> 
>>>  
>>> 
>>>  
>>> 
>>> On Sat, Jan 8, 2022 at 5:47 PM Harbs >> <mailto:harbs.li...@gmail.com>> wrote:
>>> 
>>> Use a 
>>> 
>>> > On Jan 8, 2022, at 4:34 PM, Roman Isitua >> > <mailto:romanisi...@gmail.com>> wrote:
>>> > 
>>> > Hi Harbs,
>>> > 
>>> > I am trying to create a login form. How do I hide the password in 
>>> > 
>>> > 
>>> > 
>>> >  could it be that it does not support password hiding ? Do I have to 
>>> > resort to using royale basic text field ?
>>> 
>> 
> 



Re: Spectrum UI components

2022-01-12 Thread Harbs
CSS:
#uploadsList{
  IBeadModel: 
ClassReference("org.apache.royale.html.beads.models.ArrayListSelectionModel");
  IDataProviderItemRendererMapper: 
ClassReference("org.apache.royale.html.beads.DataItemRendererFactoryForArrayList");
}

MXML:
  


  

ActionScript:
  addBead(new ArrayListSelectionModel());
  addBead(new DataItemRendererFactoryForArrayList());

> On Jan 12, 2022, at 2:44 PM, Roman Isitua  wrote:
> 
> How can this be applied let say for example on an sp:List ? As a bead ?
> 
>  Let's say I want to use arrayList  as data provider. 
> 
> 
> On Wed, 12 Jan 2022, 13:41 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> Yes.The default IDataProviderItemRendererMapper is 
> DataItemRendererFactoryForArrayData.
> 
> If you are using collections you should use 
> DataItemRendererFactoryForArrayList or 
> DataItemRendererFactoryForCollectionView instead.
> 
> HTH,
> Harbs
> 
>> On Jan 12, 2022, at 1:35 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> Hence the reason, I need to confirm from Harbs the array data type that is 
>> supported in spectrum.
>> 
>> 
>> 
>> On Tue, 11 Jan 2022, 21:33 Maria Jose Esteve, > <mailto:mjest...@iest.com>> wrote:
>> Hi,
>> 
>> From what I see in the "ListModel.as" code it allows Object, IArray and 
>> IArrayList.
>> 
>>  
>> 
>> Hiedra
>> 
>>  
>> 
>> De: Roman Isitua mailto:romanisi...@gmail.com>> 
>> Enviado el: martes, 11 de enero de 2022 20:40
>> Para: users@royale.apache.org <mailto:users@royale.apache.org>
>> Asunto: Re: Spectrum UI components
>> 
>>  
>> 
>> It is now displaying. The issue was not related to the sp:List as I 
>> initially thought.
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> 
>> 
>>  
>> 
>> 
>> 
>>   
>> 
>> 
>> 
>>  
>> 
>>  
>> 
>> 
>> 
>>  
>> 
>>   
>> 
>>   > labelField="description" dataProvider="{menuItemList}"
>> 
>>change="onSelectMenu(event)"/>
>> 
>>   
>> 
>>   
>> 
>>  
>> 
>>
>> 
>>   
>> 
>>
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> 
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> I changed the parent component from flex container to group. Though that had 
>> nothing to do  with the issue I was having.
>> 
>>  
>> 
>> My current question 
>> 
>>  
>> 
>> is Array data type the only collection class that is supported in spectrum ? 
>> 
>>  
>> 
>>  
>> 
>> On Tue, Jan 11, 2022 at 6:30 PM Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> Hi,
>> 
>>  
>> 
>> I am trying to populate my first List  for some reason it is not 
>> being populated. Here is my code snippet.
>> 
>>  
>> 
>> 
>> 
>>   
>> 
>> 
>> 
>>  
>> 
>>  
>> 
>>   
>> 
>>  
>> 
>>   
>> 
>>   > dataProvider="{newMenuItemList}"
>> 
>>   labelField="description" change="onSelectMenu(event)"/>
>> 
>>   
>> 
>>  
>> 
>>   
>> 
>>  
>> 
>>  
>> 
>> I have the following questions
>> 
>> 1. what is the expected data provider ? Array, or 
>> org.apache.royale.collections.ArrayList ? 
>> 
>> I have tried both none of them works.
>> 
>>  
>> 
>> 2.  Did I register data binding correctly ? 
>> 
>> The above ui is wrapped by a FlexContainer.
>> 
>>  
>> 
>> my data source is supposed to be an arrayList of data transfer objects 
>> (MenuItemDTO) with get set functions for each field.
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> On Sat, Jan 8, 2022 at 5:47 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> 
>> Use a 
>> 
>> > On Jan 8, 2022, at 4:34 PM, Roman Isitua > > <mailto:romanisi...@gmail.com>> wrote:
>> > 
>> > Hi Harbs,
>> > 
>> > I am trying to create a login form. How do I hide the password in 
>> > 
>> > 
>> > 
>> >  could it be that it does not support password hiding ? Do I have to 
>> > resort to using royale basic text field ?
>> 
> 



Re: Spectrum UI components

2022-01-12 Thread Harbs
Yes.The default IDataProviderItemRendererMapper is 
DataItemRendererFactoryForArrayData.

If you are using collections you should use DataItemRendererFactoryForArrayList 
or DataItemRendererFactoryForCollectionView instead.

HTH,
Harbs

> On Jan 12, 2022, at 1:35 PM, Roman Isitua  wrote:
> 
> Hence the reason, I need to confirm from Harbs the array data type that is 
> supported in spectrum.
> 
> 
> 
> On Tue, 11 Jan 2022, 21:33 Maria Jose Esteve,  <mailto:mjest...@iest.com>> wrote:
> Hi,
> 
> From what I see in the "ListModel.as" code it allows Object, IArray and 
> IArrayList.
> 
>  
> 
> Hiedra
> 
>  
> 
> De: Roman Isitua mailto:romanisi...@gmail.com>> 
> Enviado el: martes, 11 de enero de 2022 20:40
> Para: users@royale.apache.org <mailto:users@royale.apache.org>
> Asunto: Re: Spectrum UI components
> 
>  
> 
> It is now displaying. The issue was not related to the sp:List as I initially 
> thought.
> 
>  
> 
>  
> 
>  
> 
> 
> 
>  
> 
> 
> 
>   
> 
> 
> 
>  
> 
>  
> 
> 
> 
>  
> 
>   
> 
>labelField="description" dataProvider="{menuItemList}"
> 
>change="onSelectMenu(event)"/>
> 
>   
> 
>   
> 
>  
> 
>
> 
>   
> 
>
> 
>  
> 
>  
> 
>  
> 
> 
> 
>  
> 
>  
> 
>  
> 
>  
> 
> I changed the parent component from flex container to group. Though that had 
> nothing to do  with the issue I was having.
> 
>  
> 
> My current question 
> 
>  
> 
> is Array data type the only collection class that is supported in spectrum ? 
> 
>  
> 
>  
> 
> On Tue, Jan 11, 2022 at 6:30 PM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> 
> Hi,
> 
>  
> 
> I am trying to populate my first List  for some reason it is not 
> being populated. Here is my code snippet.
> 
>  
> 
> 
> 
>   
> 
> 
> 
>  
> 
>  
> 
>   
> 
>  
> 
>   
> 
>dataProvider="{newMenuItemList}"
> 
>   labelField="description" change="onSelectMenu(event)"/>
> 
>   
> 
>  
> 
>   
> 
>  
> 
>  
> 
> I have the following questions
> 
> 1. what is the expected data provider ? Array, or 
> org.apache.royale.collections.ArrayList ? 
> 
> I have tried both none of them works.
> 
>  
> 
> 2.  Did I register data binding correctly ? 
> 
> The above ui is wrapped by a FlexContainer.
> 
>  
> 
> my data source is supposed to be an arrayList of data transfer objects 
> (MenuItemDTO) with get set functions for each field.
> 
>  
> 
>  
> 
>  
> 
> On Sat, Jan 8, 2022 at 5:47 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> 
> Use a 
> 
> > On Jan 8, 2022, at 4:34 PM, Roman Isitua  > <mailto:romanisi...@gmail.com>> wrote:
> > 
> > Hi Harbs,
> > 
> > I am trying to create a login form. How do I hide the password in 
> > 
> > 
> > 
> >  could it be that it does not support password hiding ? Do I have to resort 
> > to using royale basic text field ?
> 



Re: Compiling Modules (was Re: Load time is very slow)

2022-01-12 Thread Harbs
How is this different than -js-dynamic-access-unknown-members?

> On Jan 12, 2022, at 10:04 AM, Alex Harui  wrote:
> 
>  I added a -prevent-rename-object-keys compiler option that works as a 
> post-processor.  It scans the js files being copied into bin/js-debug and 
> adds quotes around things.



Re: Creating and using spectrum composite components

2022-01-08 Thread Harbs
There’s also FlexContainer which is offers flexbox layout.

But I juts noticed that Container has ContainerBinding baked in and 
FlexContainer doesn’t. I don’t remember if there was a reason for that. 
Probably not.

HTH,
Harbs

> On Jan 8, 2022, at 7:19 PM, Roman Isitua  wrote:
> 
> Is a container the best component to use as a wrapper ?



Re: Creating and using spectrum composite components

2022-01-08 Thread Harbs
You will probably want to read about forks too:
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/working-with-forks/about-forks

> On Jan 8, 2022, at 6:58 PM, Harbs  wrote:
> 
> pull requsest.
> https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests
>  
> <https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests>
> 
> 
>> On Jan 8, 2022, at 6:55 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> Pardon my ignorance, what is a PR ?
>> 
>> 
>> 
>> On Sat, Jan 8, 2022 at 5:52 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> Card subclasses SpectrumBase.
>> 
>> To do what you want, it should subclass Spectrum Group. That’s an oversight.
>> 
>> Please make a PR. :-)
>> 
>>> On Jan 8, 2022, at 6:49 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> I have a simple spectrum view that references a container as follows
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>> The SignInForm contains the definition of the sp:Card in a separate 
>>> SignInForm.mxml file.
>>> I noticed that royale does not render the card. However, if I do this
>>> 
>>> 
>>> 
>>> 
>>> 
>>> 
>>>   
>>>
>>>   
>>>   
>>>
>>>   
>>> 
>>> 
>>>   
>>> 
>>>   
>>>   
>>> 
>>> 
>>>
>>> 
>>>   
>>>   
>>>   
>>> 
>>> 
>>>   
>>> 
>>>
>>> 
>>> 
>>> 
>>> I have to place the full definition of the sp:Card in the sp:Container for 
>>> it to be rendered. 
>>> 
>>> The disadvantage of this is that I cannot define large complex composite 
>>> components in separate mxml files and reference them in the main view mxml.
>>> 
>>> 
>>> I am able to do this using jewel or material design. It is a very useful 
>>> feature. 
>>> 
>>> Any ideas ? Can this be done using spectrum ?
>>> 
>> 
> 



Re: Creating and using spectrum composite components

2022-01-08 Thread Harbs
pull requsest.
https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/about-pull-requests


> On Jan 8, 2022, at 6:55 PM, Roman Isitua  wrote:
> 
> Pardon my ignorance, what is a PR ?
> 
> 
> 
> On Sat, Jan 8, 2022 at 5:52 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> Card subclasses SpectrumBase.
> 
> To do what you want, it should subclass Spectrum Group. That’s an oversight.
> 
> Please make a PR. :-)
> 
>> On Jan 8, 2022, at 6:49 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I have a simple spectrum view that references a container as follows
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> 
>> The SignInForm contains the definition of the sp:Card in a separate 
>> SignInForm.mxml file.
>> I noticed that royale does not render the card. However, if I do this
>> 
>> 
>> 
>> 
>> 
>> 
>>   
>>
>>   
>>   
>>
>>   
>> 
>> 
>>   
>> 
>>   
>>   
>> 
>> 
>>
>> 
>>   
>>   
>>   
>> 
>> 
>>   
>> 
>>
>> 
>> 
>> 
>> I have to place the full definition of the sp:Card in the sp:Container for 
>> it to be rendered. 
>> 
>> The disadvantage of this is that I cannot define large complex composite 
>> components in separate mxml files and reference them in the main view mxml.
>> 
>> 
>> I am able to do this using jewel or material design. It is a very useful 
>> feature. 
>> 
>> Any ideas ? Can this be done using spectrum ?
>> 
> 



Re: Creating and using spectrum composite components

2022-01-08 Thread Harbs
Card subclasses SpectrumBase.

To do what you want, it should subclass Spectrum Group. That’s an oversight.

Please make a PR. :-)

> On Jan 8, 2022, at 6:49 PM, Roman Isitua  wrote:
> 
> I have a simple spectrum view that references a container as follows
> 
> 
> 
> 
> 
> 
> 
> 
> The SignInForm contains the definition of the sp:Card in a separate 
> SignInForm.mxml file.
> I noticed that royale does not render the card. However, if I do this
> 
> 
> 
> 
> 
> 
>   
>
>   
>   
>
>   
> 
> 
>   
> 
>   
>   
> 
> 
>
> 
>   
>   
>   
> 
> 
>   
> 
>
> 
> 
> 
> I have to place the full definition of the sp:Card in the sp:Container for it 
> to be rendered. 
> 
> The disadvantage of this is that I cannot define large complex composite 
> components in separate mxml files and reference them in the main view mxml.
> 
> 
> I am able to do this using jewel or material design. It is a very useful 
> feature. 
> 
> Any ideas ? Can this be done using spectrum ?
> 



Re: Spectrum UI components

2022-01-08 Thread Harbs
Use a 

> On Jan 8, 2022, at 4:34 PM, Roman Isitua  wrote:
> 
> Hi Harbs,
> 
> I am trying to create a login form. How do I hide the password in 
> 
> 
> 
>  could it be that it does not support password hiding ? Do I have to resort 
> to using royale basic text field ?



Re: Setting up spectrum

2022-01-07 Thread Harbs
> One question, since spectrum is not part of the royale sdk, is there an as 
> doc for spectrum  ? 
> 
> I like looking api doc to understand how to use ui components (properties, 
> beads, e.t.c )

No. Sorry. I’m not very good about writing docs. :-(

(If you’re inclined I’d love to get PRs to fix that up…)

Here’s the basics:

1. Most of Spectrum does not use model and view. The exception is components 
which take dataProviders. (The view is pretty much handled by Adobe’s CSS.)
2. The source of SpectrumBrowser should give you a pretty good idea of what 
properties the components have.
3. I was pretty good about using [Inspectable] metadata, so your IDE (i.e. VS 
Code) should give you hints in MXML about what legal values for properties are.
4. Spectrum favors baking functionality in over beads.
5. Icons are specified using strings which applies named SVG symbols using 
“use” elements.

Feel free to ask me questions...

> On Jan 7, 2022, at 9:42 AM, Roman Isitua  wrote:
> 
> Thanks.
> 
> I showed my colleague the spectrum demo. He was impressed. He is UI designer. 
> We want to try it out.
> 
> One question, since spectrum is not part of the royale sdk, is there an as 
> doc for spectrum  ? 
> 
> I like looking api doc to understand how to use ui components (properties, 
> beads, e.t.c )
> 
> On Fri, 7 Jan 2022, 08:26 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> That’s right. There’s only one swc. Spectrum does not support swf.
> 
> Spectrum.swc is for js.
> 
> You need to manually copy the css files and use an html template files like 
> you have in the SpecturmBrowser project.
> 
> The easiest way to do that is to just copy the assets and template from there.
> 
>> On Jan 7, 2022, at 8:53 AM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> Harbs I have been able to build the Spectrum project using ant. I used the 
>> binary release of 0.9.8 to achieve this.
>> 
>> I have a question, in the target folder I can see only one file 
>> (Spectrum.swc). I was expecting to see three files. One Spectrum.swc and two 
>> others namely. One for js and another for swf. 
>> 
>> Can I use the Spectrum.swc in my js project ? Or is there a problem with the 
>> build process ?
>> 
>> 
>> 
>> On Wed, 5 Jan 2022, 17:39 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> Sorry for the trouble. I don’t use Maven, so I don’t have a Maven build in 
>> Spectrum.
>> 
>> You can feel free to make a PR with a Maven config to build it.
>> 
>> Thanks,
>> Harbs
>> 
>>> On Jan 5, 2022, at 4:33 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> I commented it out. It did not work. I had to comment on another area with 
>>> a similar message.
>>> 
>>> The current error
>>> 
>>> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum>ant
>>> Buildfile: C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml
>>>  [echo] ROYALE_HOME: C:\ROYALE\apache-royale-0.9.8
>>> 
>>> check-compiler-home:
>>> 
>>> check-transpiler-home:
>>> 
>>> check-compiler:
>>> 
>>> BUILD FAILED
>>> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml:78: 
>>> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\${ROYALE_COMPILER_HOME}\lib
>>>  does not exist.
>>> 
>>> 
>>> Note: I built the royale sdk using maven.
>>> 
>>> I have compared this maven built royale 0.9.8 sdk with the 0.9.7 binary 
>>> distribution I downloaded months ago when I started learning royale. I 
>>> noticed the 0.9.7 binary has a lib folder 
>>> (C:\ROYALE\apache-royale-0.9.7-bin-js-swf\royale-asjs\js\lib)  where the 
>>> compc.jar and mxmlc.jar files are located. But the maven built 0.9.8 does 
>>> not have a lib folder in that location. (Even after executing mvn clean 
>>> install)
>>> 
>>> I guess I should consider building the 0.9.8 with ant ? I hope there will 
>>> be no issues building the same sdk with maven and then ant ?
>>> 
>>> 
>>> 
>>> 
>>> On Wed, Jan 5, 2022 at 7:41 AM Yishay Weiss >> <mailto:yishayj...@hotmail.com>> wrote:
>>> I don’t know why that check was necessary in the original build, but it 
>>> seems it isn’t for the spectrum one. Roman, you can just remove this line 
>>> [1] from build.xml and I think it should work.
>>> 
>>>  
>>> 
>>> [1]
>>> 
>>> >> 
>>> unless="ROYAL

Re: Setting up spectrum

2022-01-06 Thread Harbs
That’s right. There’s only one swc. Spectrum does not support swf.

Spectrum.swc is for js.

You need to manually copy the css files and use an html template files like you 
have in the SpecturmBrowser project.

The easiest way to do that is to just copy the assets and template from there.

> On Jan 7, 2022, at 8:53 AM, Roman Isitua  wrote:
> 
> Harbs I have been able to build the Spectrum project using ant. I used the 
> binary release of 0.9.8 to achieve this.
> 
> I have a question, in the target folder I can see only one file 
> (Spectrum.swc). I was expecting to see three files. One Spectrum.swc and two 
> others namely. One for js and another for swf. 
> 
> Can I use the Spectrum.swc in my js project ? Or is there a problem with the 
> build process ?
> 
> 
> 
> On Wed, 5 Jan 2022, 17:39 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> Sorry for the trouble. I don’t use Maven, so I don’t have a Maven build in 
> Spectrum.
> 
> You can feel free to make a PR with a Maven config to build it.
> 
> Thanks,
> Harbs
> 
>> On Jan 5, 2022, at 4:33 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I commented it out. It did not work. I had to comment on another area with a 
>> similar message.
>> 
>> The current error
>> 
>> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum>ant
>> Buildfile: C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml
>>  [echo] ROYALE_HOME: C:\ROYALE\apache-royale-0.9.8
>> 
>> check-compiler-home:
>> 
>> check-transpiler-home:
>> 
>> check-compiler:
>> 
>> BUILD FAILED
>> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml:78: 
>> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\${ROYALE_COMPILER_HOME}\lib
>>  does not exist.
>> 
>> 
>> Note: I built the royale sdk using maven.
>> 
>> I have compared this maven built royale 0.9.8 sdk with the 0.9.7 binary 
>> distribution I downloaded months ago when I started learning royale. I 
>> noticed the 0.9.7 binary has a lib folder 
>> (C:\ROYALE\apache-royale-0.9.7-bin-js-swf\royale-asjs\js\lib)  where the 
>> compc.jar and mxmlc.jar files are located. But the maven built 0.9.8 does 
>> not have a lib folder in that location. (Even after executing mvn clean 
>> install)
>> 
>> I guess I should consider building the 0.9.8 with ant ? I hope there will be 
>> no issues building the same sdk with maven and then ant ?
>> 
>> 
>> 
>> 
>> On Wed, Jan 5, 2022 at 7:41 AM Yishay Weiss > <mailto:yishayj...@hotmail.com>> wrote:
>> I don’t know why that check was necessary in the original build, but it 
>> seems it isn’t for the spectrum one. Roman, you can just remove this line 
>> [1] from build.xml and I think it should work.
>> 
>>  
>> 
>> [1]
>> 
>> > 
>> unless="ROYALE_SWF_COMPILER_HOME"/>
>> 
>>  
>> 
>> From: Harbs <mailto:harbs.li...@gmail.com>
>> Sent: Wednesday, January 5, 2022 12:07 AM
>> To: users@royale.apache.org <mailto:users@royale.apache.org>
>> Subject: Re: Setting up spectrum
>> 
>>  
>> 
>> It’s checking for compiler-mxmlc.jar in the lib directory in ROYALE_HOME. 
>> Are you missing that for some reason?
>> 
>> I’m not sure why it’s checking for that instead of compc.jar which is what 
>> it should actually be using.
>> 
>> It was copied from the build.xml files used in the framework compile.
>> 
>> Maybe Alex or Josh (or Greg?) can comment on that.
>> 
>> > On Jan 4, 2022, at 11:54 PM, Roman Isitua > > <mailto:romanisi...@gmail.com>> wrote:
>> > 
>> > I am trying to build royale spectrum from source using ant.
>> > 
>> > I get the below error 
>> > 
>> > C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum>ant
>> > Buildfile: C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml
>> >  [echo] ROYALE_HOME: C:\ROYALE\apache-royale-0.9.8
>> > 
>> > check-compiler-home:
>> > 
>> > BUILD FAILED
>> > C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml:90: 
>> > ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder 
>> > containing compiler-mxmlc.jar such as the compiler folder in 
>> > royale-compiler repo or the root of a Royale SDK
>> > 
>> > Total time: 0 seconds
>> > 
>> > 
>> > I have set the ROYALE_HOME correctly. 
>> > 
>> > How can I set ROYALE_SWF_COMPILER_HOME ? What is the correct path ?
>> > 
>> > I built my royale sdk from source.
>> > 
>> > Regards,
>> > 
>> >
>> 
>>  
>> 
> 



Re: Setting up spectrum

2022-01-05 Thread Harbs
Sorry for the trouble. I don’t use Maven, so I don’t have a Maven build in 
Spectrum.

You can feel free to make a PR with a Maven config to build it.

Thanks,
Harbs

> On Jan 5, 2022, at 4:33 PM, Roman Isitua  wrote:
> 
> I commented it out. It did not work. I had to comment on another area with a 
> similar message.
> 
> The current error
> 
> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum>ant
> Buildfile: C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml
>  [echo] ROYALE_HOME: C:\ROYALE\apache-royale-0.9.8
> 
> check-compiler-home:
> 
> check-transpiler-home:
> 
> check-compiler:
> 
> BUILD FAILED
> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml:78: 
> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\${ROYALE_COMPILER_HOME}\lib
>  does not exist.
> 
> 
> Note: I built the royale sdk using maven.
> 
> I have compared this maven built royale 0.9.8 sdk with the 0.9.7 binary 
> distribution I downloaded months ago when I started learning royale. I 
> noticed the 0.9.7 binary has a lib folder 
> (C:\ROYALE\apache-royale-0.9.7-bin-js-swf\royale-asjs\js\lib)  where the 
> compc.jar and mxmlc.jar files are located. But the maven built 0.9.8 does not 
> have a lib folder in that location. (Even after executing mvn clean install)
> 
> I guess I should consider building the 0.9.8 with ant ? I hope there will be 
> no issues building the same sdk with maven and then ant ?
> 
> 
> 
> 
> On Wed, Jan 5, 2022 at 7:41 AM Yishay Weiss  <mailto:yishayj...@hotmail.com>> wrote:
> I don’t know why that check was necessary in the original build, but it seems 
> it isn’t for the spectrum one. Roman, you can just remove this line [1] from 
> build.xml and I think it should work.
> 
>  
> 
> [1]
> 
>  
> unless="ROYALE_SWF_COMPILER_HOME"/>
> 
>  
> 
> From: Harbs <mailto:harbs.li...@gmail.com>
> Sent: Wednesday, January 5, 2022 12:07 AM
> To: users@royale.apache.org <mailto:users@royale.apache.org>
> Subject: Re: Setting up spectrum
> 
>  
> 
> It’s checking for compiler-mxmlc.jar in the lib directory in ROYALE_HOME. Are 
> you missing that for some reason?
> 
> I’m not sure why it’s checking for that instead of compc.jar which is what it 
> should actually be using.
> 
> It was copied from the build.xml files used in the framework compile.
> 
> Maybe Alex or Josh (or Greg?) can comment on that.
> 
> > On Jan 4, 2022, at 11:54 PM, Roman Isitua  > <mailto:romanisi...@gmail.com>> wrote:
> > 
> > I am trying to build royale spectrum from source using ant.
> > 
> > I get the below error 
> > 
> > C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum>ant
> > Buildfile: C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml
> >  [echo] ROYALE_HOME: C:\ROYALE\apache-royale-0.9.8
> > 
> > check-compiler-home:
> > 
> > BUILD FAILED
> > C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml:90: 
> > ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder 
> > containing compiler-mxmlc.jar such as the compiler folder in 
> > royale-compiler repo or the root of a Royale SDK
> > 
> > Total time: 0 seconds
> > 
> > 
> > I have set the ROYALE_HOME correctly. 
> > 
> > How can I set ROYALE_SWF_COMPILER_HOME ? What is the correct path ?
> > 
> > I built my royale sdk from source.
> > 
> > Regards,
> > 
> >
> 
>  
> 



Re: Setting up spectrum

2022-01-04 Thread Harbs
It’s checking for compiler-mxmlc.jar in the lib directory in ROYALE_HOME. Are 
you missing that for some reason?

I’m not sure why it’s checking for that instead of compc.jar which is what it 
should actually be using.

It was copied from the build.xml files used in the framework compile.

Maybe Alex or Josh (or Greg?) can comment on that.

> On Jan 4, 2022, at 11:54 PM, Roman Isitua  wrote:
> 
> I am trying to build royale spectrum from source using ant.
> 
> I get the below error 
> 
> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum>ant
> Buildfile: C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml
>  [echo] ROYALE_HOME: C:\ROYALE\apache-royale-0.9.8
> 
> check-compiler-home:
> 
> BUILD FAILED
> C:\Users\nyemi\git\spectrum\spectrum-royale\Spectrum\build.xml:90: 
> ROYALE_SWF_COMPILER_HOME must be set to a folder with a lib sub-folder 
> containing compiler-mxmlc.jar such as the compiler folder in royale-compiler 
> repo or the root of a Royale SDK
> 
> Total time: 0 seconds
> 
> 
> I have set the ROYALE_HOME correctly. 
> 
> How can I set ROYALE_SWF_COMPILER_HOME ? What is the correct path ?
> 
> I built my royale sdk from source.
> 
> Regards,
> 
> 



Re: Compiling Modules (was Re: Load time is very slow)

2021-12-30 Thread Harbs
Did you apply the input_file options to the module?

> On Dec 30, 2021, at 11:42 PM, Roman Isitua  wrote:
> 
> 
> I have applied the js compiler option as follows
> 
> -source-map=false;-compiler.show-binding-warnings=false;-js-default-initializers=true;-js-dynamic-access-unknown-members=true;
> -js-compiler-option=--variable_map_output_file 
> gccvars.txt;-js-compiler-option+=--property_map_output_file gccprops.txt
>   
> 
> 
> I get the same error as before when attempting to launch the jewel module.
> 
> 
> 
> 
> Same error trace.
> 
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOver (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> FrontEnd.js:1640 Uncaught TypeError: M is not a function
> at oM.J.handleMouseOut (FrontEnd.js:1640)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:248)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined 
> (reading 'prototype')
> at P (Overview.js:56)
> at SG.convert (FrontEnd.js:904)
> at ny (FrontEnd.js:248)
> at HTMLElement.iy (FrontEnd.js:125)
> at HTMLElement.b (FrontEnd.js:121)
> 
> On Thu, Dec 30, 2021 at 6:56 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> 1. I’d get rid of the agressive minification options. It will likely cause 
> issues. If you get it to work without those options, you can try to add them 
> back in and see if it still works.
> 2. You seem to be missing the compiler options explained here: 
> https://apache.github.io/royale-docs/features/modules#minification 
> <https://apache.github.io/royale-docs/features/modules#minification>
> 
> For a pom, it would look something like this (adjust your paths to match your 
> setup):
> 
> Main app:
> -source-map=true;-js-compiler-option=--variable_map_output_file
>  gccvars.txt;-js-compiler-option+=--property_map_output_file 
> gccprops.txt
> 
> Module:
> -source-map=true;-js-compiler-option=--variable_map_input_file
>  
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
>  
> ../../../../../MainApp/bin/js-release/gccprops.txt
> 
>> On Dec 30, 2021, at 7:43 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I think it will be better for me to share my pom's that way you can see all 
>> the compilation options used.  The pom for the parent (FmClient2), the 
>> MainApp and one module (Overview) have been attached to this email.
>> 
>> 
>> On Thu, Dec 30, 2021 at 6:22 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> Roman, can you share your full compi

Re: Compiling Modules (was Re: Load time is very slow)

2021-12-30 Thread Harbs
Wait. I’m confused.

Does your app work? I’m assuming that your app is not the same as Roman’s.

> On Dec 30, 2021, at 8:07 PM, Maria Jose Esteve  wrote:
> 
> I was preparing an email with a battery of tests but I don't use any 
> configuration or property files... maybe I'd better stop and read it to you.
>  
> Hiedra
>  
> De: Harbs  
> Enviado el: jueves, 30 de diciembre de 2021 18:56
> Para: users@royale.apache.org
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>  
> 1. I’d get rid of the agressive minification options. It will likely cause 
> issues. If you get it to work without those options, you can try to add them 
> back in and see if it still works.
> 2. You seem to be missing the compiler options explained here: 
> https://apache.github.io/royale-docs/features/modules#minification 
> <https://apache.github.io/royale-docs/features/modules#minification>
>  
> For a pom, it would look something like this (adjust your paths to match your 
> setup):
>  
> Main app:
> -source-map=true;-js-compiler-option=--variable_map_output_file
>  gccvars.txt;-js-compiler-option+=--property_map_output_file 
> gccprops.txt
>  
> Module:
> -source-map=true;-js-compiler-option=--variable_map_input_file
>  
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
>  
> ../../../../../MainApp/bin/js-release/gccprops.txt
>  
> On Dec 30, 2021, at 7:43 PM, Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
>  
> I think it will be better for me to share my pom's that way you can see all 
> the compilation options used.  The pom for the parent (FmClient2), the 
> MainApp and one module (Overview) have been attached to this email.
>  
>  
> On Thu, Dec 30, 2021 at 6:22 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> Roman, can you share your full compiler options?
>  
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> 
> 
> I enabled the below settings
> 
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
> 
> 
> The release version starts up
>  
> Hiedra, that’s great!
> 
> 
> On Dec 30, 2021, at 7:15 PM, Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
>  
>  
> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>  
> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve  <mailto:mjest...@iest.com>> wrote:
> Roman, are you testing with the SDK compiled from the Harb branches, 
> ROYALE_INTERFACE_INFO, or from develop?
>  
> Hiedra
>  
> De: Roman Isitua mailto:romanisi...@gmail.com>> 
> Enviado el: jueves, 30 de diciembre de 2021 16:52
> Para: users@royale.apache.org <mailto:users@royale.apache.org>
> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>  
> I decided to remove the below settings completely
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> 
> 
> I enabled the below settings
> 
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
> 
> 
> The release version starts up
>  
>  
>  
> 
>  
>  
> 
>  
> However, the moment I launch a module. I get the below error
>  
> 
>  
>  
> It appears to be failing when I launch the "Overview" module (by clicking the 
> Overview side menu).
>  
> So my current observation is that by retaining only two settings
>  
> -js-dynamic-access-unknown-members=true;
> -js-default-initializers=true
>  
> The release module starts up but the app fails whenever I launch a module.
>  
> The smallest size settings in the documentation do not work. The app does not 
> start up.
>  
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
>  
>  
>  
> The error trace is below
>  
>  
> Uncaught TypeError: cm.valuesImpl.init is not a function
> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
> at Function.mq.generateMXMLProperties (Overview.js:743)
> at Wr.lq.generateMXMLAttributes (Overview.js:551)
> at new Wr (Overview.js:810)
> at QN.J.loadHandler (FrontEnd.js:1978)
> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined 
> (reading 'prototype')
> at P (Overview.js:56)
> at VG.convert (FrontEnd.js:910)
> at ny (FrontEnd.js:250)
> at HTMLElement.iy (FrontEnd.j

Re: Compiling Modules (was Re: Load time is very slow)

2021-12-30 Thread Harbs
I’d try removing these:

-export-public-symbols=false;-prevent-rename-protected-symbols=false;-prevent-rename-public-symbols=false;-prevent-rename-internal-symbols=false;

https://apache.github.io/royale-docs/create-an-application/optimizations/minification#smallest-size

> On Dec 30, 2021, at 8:04 PM, Roman Isitua  wrote:
> 
> Kindly clarify what you mean by "no 1. Get rid of aggressive mimification 
> options " ? Which of the options are aggressive  ?
> 
> 
> I will apply no 2 and revert with my findings.
> 
> On Thu, 30 Dec 2021, 18:56 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> 1. I’d get rid of the agressive minification options. It will likely cause 
> issues. If you get it to work without those options, you can try to add them 
> back in and see if it still works.
> 2. You seem to be missing the compiler options explained here: 
> https://apache.github.io/royale-docs/features/modules#minification 
> <https://apache.github.io/royale-docs/features/modules#minification>
> 
> For a pom, it would look something like this (adjust your paths to match your 
> setup):
> 
> Main app:
> -source-map=true;-js-compiler-option=--variable_map_output_file
>  gccvars.txt;-js-compiler-option+=--property_map_output_file 
> gccprops.txt
> 
> Module:
> -source-map=true;-js-compiler-option=--variable_map_input_file
>  
> ../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
>  
> ../../../../../MainApp/bin/js-release/gccprops.txt
> 
>> On Dec 30, 2021, at 7:43 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> I think it will be better for me to share my pom's that way you can see all 
>> the compilation options used.  The pom for the parent (FmClient2), the 
>> MainApp and one module (Overview) have been attached to this email.
>> 
>> 
>> On Thu, Dec 30, 2021 at 6:22 PM Harbs > <mailto:harbs.li...@gmail.com>> wrote:
>> Roman, can you share your full compiler options?
>> 
>>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>> 
>>> 
>>> I enabled the below settings
>>> 
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>> 
>>> 
>>> The release version starts up
>>> 
>>>  
>>> 
>> 
>> Hiedra, that’s great!
>> 
>>> On Dec 30, 2021, at 7:15 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> 
>>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>>> 
>>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve >> <mailto:mjest...@iest.com>> wrote:
>>> Roman, are you testing with the SDK compiled from the Harb branches, 
>>> ROYALE_INTERFACE_INFO, or from develop?
>>> 
>>>  
>>> 
>>> Hiedra
>>> 
>>>  
>>> 
>>> De: Roman Isitua mailto:romanisi...@gmail.com>> 
>>> Enviado el: jueves, 30 de diciembre de 2021 16:52
>>> Para: users@royale.apache.org <mailto:users@royale.apache.org>
>>> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>>> 
>>>  
>>> 
>>> I decided to remove the below settings completely
>>> -export-public-symbols=false
>>> -prevent-rename-protected-symbols=false
>>> -prevent-rename-public-symbols=false
>>> -prevent-rename-internal-symbols=false
>>> 
>>> 
>>> I enabled the below settings
>>> 
>>> -js-dynamic-access-unknown-members=true;
>>> -js-default-initializers=true
>>> 
>>> 
>>> The release version starts up
>>> 
>>>  
>>> 
>>>  
>>> 
>>>  
>>> 
>>> 
>>> 
>>>  
>>> 
>>>  
>>> 
>>> 
>>> 
>>>  
>>> 
>>> However, the moment I launch a module. I get the below error
>>> 
>>>  
>>> 
>>> 
>>> 
>>>  
>>> 
>>>  
>>> 
>>> It appears to be failing when I launch the "Overview" module (by clicking 
>>> the Overview side menu).
>>> 
>>>  
>>> 
>>> So my current observation is that by retaining only two settings
>>> 
>>>  
>>> 
>>> -js-dynamic-access-unknown-members=tru

Re: Compiling Modules (was Re: Load time is very slow)

2021-12-30 Thread Harbs
1. I’d get rid of the agressive minification options. It will likely cause 
issues. If you get it to work without those options, you can try to add them 
back in and see if it still works.
2. You seem to be missing the compiler options explained here: 
https://apache.github.io/royale-docs/features/modules#minification

For a pom, it would look something like this (adjust your paths to match your 
setup):

Main app:
-source-map=true;-js-compiler-option=--variable_map_output_file
 gccvars.txt;-js-compiler-option+=--property_map_output_file 
gccprops.txt

Module:
-source-map=true;-js-compiler-option=--variable_map_input_file
 
../../../../../MainApp/bin/js-release/gccvars.txt;-js-compiler-option+=--property_map_input_file
 ../../../../../MainApp/bin/js-release/gccprops.txt

> On Dec 30, 2021, at 7:43 PM, Roman Isitua  wrote:
> 
> I think it will be better for me to share my pom's that way you can see all 
> the compilation options used.  The pom for the parent (FmClient2), the 
> MainApp and one module (Overview) have been attached to this email.
> 
> 
> On Thu, Dec 30, 2021 at 6:22 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> Roman, can you share your full compiler options?
> 
>> I decided to remove the below settings completely
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>> 
>> 
>> I enabled the below settings
>> 
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>> 
>> 
>> The release version starts up
>> 
>>  
>> 
> 
> Hiedra, that’s great!
> 
>> On Dec 30, 2021, at 7:15 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> 
>> Yes. I am testing with the sdk compiled on branch ROYALE_INTERFACE_INFO
>> 
>> On Thu, Dec 30, 2021 at 6:10 PM Maria Jose Esteve > <mailto:mjest...@iest.com>> wrote:
>> Roman, are you testing with the SDK compiled from the Harb branches, 
>> ROYALE_INTERFACE_INFO, or from develop?
>> 
>>  
>> 
>> Hiedra
>> 
>>  
>> 
>> De: Roman Isitua mailto:romanisi...@gmail.com>> 
>> Enviado el: jueves, 30 de diciembre de 2021 16:52
>> Para: users@royale.apache.org <mailto:users@royale.apache.org>
>> Asunto: Re: Compiling Modules (was Re: Load time is very slow)
>> 
>>  
>> 
>> I decided to remove the below settings completely
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>> 
>> 
>> I enabled the below settings
>> 
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>> 
>> 
>> The release version starts up
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> 
>> 
>>  
>> 
>>  
>> 
>> 
>> 
>>  
>> 
>> However, the moment I launch a module. I get the below error
>> 
>>  
>> 
>> 
>> 
>>  
>> 
>>  
>> 
>> It appears to be failing when I launch the "Overview" module (by clicking 
>> the Overview side menu).
>> 
>>  
>> 
>> So my current observation is that by retaining only two settings
>> 
>>  
>> 
>> -js-dynamic-access-unknown-members=true;
>> -js-default-initializers=true
>> 
>>  
>> 
>> The release module starts up but the app fails whenever I launch a module.
>> 
>>  
>> 
>> The smallest size settings in the documentation do not work. The app does 
>> not start up.
>> 
>>  
>> 
>> -export-public-symbols=false
>> -prevent-rename-protected-symbols=false
>> -prevent-rename-public-symbols=false
>> -prevent-rename-internal-symbols=false
>> 
>>  
>> 
>>  
>> 
>>  
>> 
>> The error trace is below
>> 
>>  
>> 
>>  
>> 
>> Uncaught TypeError: cm.valuesImpl.init is not a function
>> at Wr.Rr.pl <http://wr.rr.pl/> (Overview.js:792)
>> at Function.mq.generateMXMLProperties (Overview.js:743)
>> at Wr.lq.generateMXMLAttributes (Overview.js:551)
>> at new Wr (Overview.js:810)
>> at QN.J.loadHandler (FrontEnd.js:1978)
>> 3Overview.js:56 Uncaught TypeError: Cannot read properties of undefined 
>> (reading 'prototype')
>> at P (Overview.js:56)
>> at VG.convert (FrontEnd.js:910)
>> at ny (FrontEnd.js:250)
>> at HTMLElement.iy (Fro

Re: Compiling Modules (was Re: Load time is very slow)

2021-12-30 Thread Harbs
rror: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOver (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOver @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> FrontEnd.js:1649 Uncaught TypeError: M is not a function
> at sM.J.handleMouseOut (FrontEnd.js:1649)
> at Function.ny [as googFireListener] (FrontEnd.js:123)
> at ny (FrontEnd.js:250)
> at HTMLAnchorElement.iy (FrontEnd.js:125)
> at HTMLAnchorElement.b (FrontEnd.js:121)
> J.handleMouseOut @ FrontEnd.js:1649
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:250
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
> 
>  
> 
> On Thu, Dec 30, 2021 at 4:32 PM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> 
> I get the same error even when I set the 
> -js-dynamic-access-unknown-members=true;
> 
>  
> 
> On Thu, Dec 30, 2021 at 4:24 PM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> 
>  
> 
> Using the below settings, 
> 
> -export-public-symbols=false
> -prevent-rename-protected-symbols=false
> -prevent-rename-public-symbols=false
> -prevent-rename-internal-symbols=false
> -js-dynamic-access-unknown-members=false;
> 
> -js-default-initializers=true
> 
> 
> Debug version runs fine. The release version does not start up
> 
> 
> 
> 
> I get the below errors
> 
> Uncaught TypeError: Cannot read properties of undefined (reading 'apply')
> at KE.hm (FrontEnd.js:1600)
> at XE.M.Fb (FrontEnd.js:943)
> at XE.M.uh (FrontEnd.js:937)
> at FE.M.na <http://fe.m.na/> (FrontEnd.js:497)
> at FE.M.v (FrontEnd.js:497)
> at dR.M.S (FrontEnd.js:213)
> at dR.Nz.S (FrontEnd.js:217)
> at dR.M.start (FrontEnd.js:1396)
> at index.html:45
> :8080/favicon.ico:1 Failed to load resource: the server responded with a 
> status of 404 (Not Found)
> 
>  
> 
>  
> 
> FrontEnd.js is the start up class for the application. i.e. It implements the 
> Jewel application class.
> 
>  
> 
>  
> 
>  
> 
> On Thu, Dec 30, 2021 at 3:19 PM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> 
> Hi Harb,
> 
>  
> 
> Thanks for your response. I have gone through the documentation. I will do my 
> test again starting with the smallest size option and share my findings.
> 
>  
> 
> Regards,
> 
>  
> 
> On Thu, Dec 30, 2021 at 10:59 AM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> 
> Sorry for my deal in responding.
> 
>  
> 
> Let’s take a step back.
> 
>  
> 
> I’m not sure how you are compiling your modules. I just added some content to 
> the module documentation page which explains what compiler options you need 
> while compiling modules. (It still needs some editing.) 
> https://apache.github.io/royale-docs/features/modules#minification 
> <https://apache.github.io/royale-docs/features/modules#minification>
>  
> 
> Are you using those options?
> 
> 
> 
> 
> On Dec 29, 2021, at 2:19 AM, Maria Jose Esteve  <mailto:mjest...@iest.com>> wrote:
> 
>  
> 
> Hi, Let me join you with these tests
> 
>  
> 
> @Harb, I have compiled the SDK from th

Compiling Modules (was Re: Load time is very slow)

2021-12-30 Thread Harbs
.js:2336:472>)
> at r$.J.initialize (http://localhost:8080/WPWebRelease/App.js:5041:66 
> <http://localhost:8080/WPWebRelease/App.js:5041:66>)
> at OW.J.init (http://localhost:8080/WPWebRelease/App.js:950:452 
> <http://localhost:8080/WPWebRelease/App.js:950:452>)
> at OW.J.u (http://localhost:8080/WPWebRelease/App.js:951:454 
> <http://localhost:8080/WPWebRelease/App.js:951:454>)
> at $$.J.addBead (http://localhost:8080/WPWebRelease/App.js:357:549 
> <http://localhost:8080/WPWebRelease/App.js:357:549>)
>  
> The main difference:
> project compiled from "SDK-develop" runs fine in js-debug and gives error in 
> js-release and, compiled from "SDK-ROYALE_INTERFACE_INFO" does not launch 
> because of conversion error.
>  
> Hiedra
>  
> De: Roman Isitua mailto:romanisi...@gmail.com>> 
> Enviado el: martes, 28 de diciembre de 2021 15:55
> Para: users@royale.apache.org <mailto:users@royale.apache.org>
> Asunto: Re: Load time is very slow
>  
> @Harb
>  
> I have checked out the feature/ROYALE_INTERFACE_INFO branch and compiled asjs 
> and compiler. I have rebuilt my application with modules in release mode.
>  
> I get the following error when I attempt to launch a module
>  
>  
> 
>  
>  
> The module loads fine in debug mode
>  
> 
>  
>  
> Snippets of the log
>  
> Overview.js:786 Uncaught TypeError: cm.valuesImpl.init is not a function
> at Rr.Mr.yl (Overview.js:786)
> at Function.iq.generateMXMLProperties (Overview.js:736)
> at Rr.hq.generateMXMLAttributes (Overview.js:546)
> at new Rr (Overview.js:804)
> at LN.J.loadHandler (FrontEnd.js:1967)
> Mr.yl @ Overview.js:786
> iq.generateMXMLProperties @ Overview.js:736
> hq.generateMXMLAttributes @ Overview.js:546
> Rr @ Overview.js:804
> J.loadHandler @ FrontEnd.js:1967
> load (async)
> LN.loadModule @ FrontEnd.js:1965
> dN.loadModule @ FrontEnd.js:2406
> LD.Un @ FrontEnd.js:1809
> ny @ FrontEnd.js:123
> ny @ FrontEnd.js:248
> iy @ FrontEnd.js:125
> b @ FrontEnd.js:121
>  
>  
> I have attached the full log to this email.
>  
>  
>  
>  
> On Tue, Dec 28, 2021 at 2:51 PM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> Hi Maria,
>  
> Prior to starting this mail discussion "Load time is very slow". I can 
> confirm I have only been compiling in debug mode. My target\javascript\bin\ 
> only had js-debug. It was after I upgraded my royale sdk from 0.9.7 to 0.9.8 
> that I compiled in release mode.
>  
>  
>  
> On Tue, Dec 28, 2021 at 2:24 PM Maria Jose Esteve  <mailto:mjest...@iest.com>> wrote:
> Hi, @Roman, I think you are doing a double compile can it be? My times are 
> the same as yours and I always compile in debug and release.
>  
> Look at your target folder " target\javascript\bin\" and if you have two 
> folders: js-debug and js-release you are compiling always double.
>  
> In my case, the architecture of my project as well as the Maven compilation 
> files (pom.xml) were provided by an external company (we didn't know anything 
> about Maven or Royale at that time) and I understand that this formula was 
> chosen to show us the options we had.
>  
> A priori and without doing any test as Harb has done, I think that modularity 
> gives us the advantage of compiling parts of the code once and not compiling 
> them again if they are not modified. So far WITH MY COMPILATION TIMES, 
> sometimes more than 1 minute, this is fundamental. But of course, now we have 
> the problem of minification of the modules and it is really a serious problem 
> because it is impossible for us to deploy in production.
>  
> I will try to separate the compiación realese with a profile and if I succeed 
> I will pass it to you @Roman.
>  
> @Harb what do you mean by compiling the ROYALE_INTERFACE_INFO branch?
>  
> Hiedra
>  
> De: Harbs mailto:harbs.li...@gmail.com>> 
> Enviado el: lunes, 27 de diciembre de 2021 18:32
> Para: users@royale.apache.org <mailto:users@royale.apache.org>
> Asunto: Re: Load time is very slow
>  
> That doesn’t sound right.
>  
> Are you sure you’re compiling debug and not release? That sounds like release 
> build times.
>  
> 
> On Dec 27, 2021, at 3:31 PM, Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
>  
>  Wow ! You are using a workstation with a bleeding edge processor.
>  
>  I just compiled my app now. It took 44 seconds. (First compilation after ide 
> start up.) Subsequently compilations are usually 19s to 20s.
>  
>  My application code base is very very small compared to yours.  As we 
> continue to add functionality, I expect the compile times to rise.
>  
>  



Re: Load time is very slow

2021-12-28 Thread Harbs
Yes. This is one of the things I’d like to see happen in 2022.

It should even be possible to automatically load changed JS files in the 
browser without reloading the whole page (in some cases).

> On Dec 28, 2021, at 9:13 AM, Yishay Weiss  wrote:
> 
> > That said, I’d like for us to add incremental compiles which should make 
> > updates basically instant.
>  
> That would be huge.



Re: Load time is very slow

2021-12-27 Thread Harbs
> IMO, modularity is a well-proven software development construct.

I’m willing to concede that there might be places where modules in Royale is a 
good idea. Although I have a hard time wrapping my head around the application 
size and complexity where you'd hit that threshold.

But applying Flash experience to modules in Royale is not a good strategy IMO. 
Here’s some points to consider:

1. We saw huge drops in compilation speed when switching from Flash to HTML 
Royale for the same application.
2. The application size dropped drastically as well, and the whole application 
became about the size of a single module.
3. Network speeds have improved drastically over the last 10 years.
4. JS caching in the browser is much better than Flash caching was. I have my 
deployments setup so my application resource files (js, css, etc.) are cached 
for 30 days and when I deploy a new version, the cache is automatically 
invalidated.
5. Using modules limits how aggressively code can be minified. Improved 
minification helps both in deployed code size and speed of code execution. I’ve 
been working for the last 2-3 weeks pretty heavily on fixing the architecture 
of both my app and libraries and Royale to make agressive minification work in 
more scenarios.
6. A large part of application and module size in Flash was caused by embedded 
assets. In HTML, assets are stored externally and only loaded when/if they are 
actually needed.

I would be VERY wary of using modules unless there’s a very compelling reason 
to do so.

I’d also consider very strongly whether you need something like Crux which 
brings along with it all the baggage associated with Reflection.

My $0.02,
Harbs


> On Dec 28, 2021, at 2:01 AM, Alex Harui  wrote:
> 
> IMO, modularity is a well-proven software development construct.  It was key 
> to making some really big Flex apps efficient for both development time as 
> well as initialization time.  But like most things, it has to be done 
> properly.  Too many small modules will slow initialization time, one huge app 
> without modules may not load in time.  Modules allow for pay-as-you=go 
> loading of code which is sometimes quite important.
> 
> The trade-offs are a bit different in Royale vs Flex so it won’t always be 
> true that if your Flex app benefited from modules that your Royale app will 
> as well.  Or that the thresholds of module size are the same.  With 
> minification and gzip transfer over the network and probably some other 
> factors, you can probably get away with fewer large modules in Royale.
>  
> That said, performance problems should be analyzed with a profiler.
>  
> Of course, I could be wrong…
> -Alex
>  
> From: Harbs 
> Reply-To: "users@royale.apache.org" 
> Date: Monday, December 27, 2021 at 4:40 AM
> To: "users@royale.apache.org" 
> Subject: Re: Load time is very slow
>  
>  
> 
> 
>> On Dec 27, 2021, at 2:04 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>>  
>> - compile times. With modules as I am adding new features to the app, 
>> compile times will not be affected too much.
>>  This is very useful for my small team. We are not using the latest 
>> workstation with bleeding edge processors. My laptop uses
>> a 2017 core i7 processor. My other team members have slightly lower specs 
>> than mine. So compile time is something that we 
>> are mindful of.
>  
> Compile times of debug builds should be very fast. What compile times are you 
> seeing?
>  
> If compile times are slow, we should work on fixing that...
> 
> 
>> - modules make it easier to share development tasks.
>  
> Why? We don’t have issues sharing tasks on the same application. I’d like to 
> understand better why this is an issue for you.
> 
> 
>> I want to believe there will be performance benefits as well. e.g. faster 
>> load times and memory e.t.c
> 
>  
> I don’t think there will be. I think the opposite might be true.



Re: Load time is very slow

2021-12-27 Thread Harbs
Four minutes for debug? Wow. Are you sure it’s only JS and debug?

That seems insane.

> On Dec 28, 2021, at 9:13 AM, Yishay Weiss  wrote:
> 
> We have a client now whose devs are seeing four minutes for each iteration, 
> on top of which they have other startup tasks that can take a few minutes.



Re: Load time is very slow

2021-12-27 Thread Harbs
The build instructions should be the same.

checkout the branch in both royale-compiler and royale-asjs and rebuild the 
same way you normally do.

This git command should check out the branch.

git checkout feature/ROYALE_INTERFACE_INFO

If it doesn’t work, details on what happens should help us fix it.

> On Dec 27, 2021, at 3:37 PM, Roman Isitua  wrote:
> 
> Would definitely not mind trying this out. 
> 
> I have built 0.9.8 from source before following the instructions here
> 
> https://royale.apache.org/source-code/ 
> 
> 
> I checked out the branch "develop" and built the source. 
> 
> My app uses maven.
> 
> How can I test this out ? 



Re: Load time is very slow

2021-12-27 Thread Harbs
That doesn’t sound right.

Are you sure you’re compiling debug and not release? That sounds like release 
build times.

> On Dec 27, 2021, at 3:31 PM, Roman Isitua  wrote:
> 
>  Wow ! You are using a workstation with a bleeding edge processor.
> 
>  I just compiled my app now. It took 44 seconds. (First compilation after ide 
> start up.) Subsequently compilations are usually 19s to 20s.
> 
>  My application code base is very very small compared to yours.  As we 
> continue to add functionality, I expect the compile times to rise.
> 



Re: Load time is very slow

2021-12-27 Thread Harbs
Yes. I made some changes which I’m hoping might help for modules.

> On Dec 27, 2021, at 3:06 PM, Roman Isitua  wrote:
> 
> What feature are you referring to here ? Minification of modules ? Please 
> clarify.
> 
> 
> On Mon, Dec 27, 2021 at 1:44 PM Harbs  <mailto:harbs.li...@gmail.com>> wrote:
> If you could try out the feature/ROYALE_INTERFACE_INFO branch and let me know 
> if that helps, it would be very helpful.
> 
> You need to pull that branch both for royale-compiler and royale-asjs.
> 
> 
>> On Dec 27, 2021, at 2:04 PM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> So I definitely need to figure out how to get modules working with 
>> minification. 
>> 
>> I have also been following the threads on the developer list on 
>> minification. 
> 



Re: Load time is very slow

2021-12-27 Thread Harbs
> Compile times of debug builds should be very fast. What compile times are you 
> seeing?
> 
>   What I mean is that, if we develop the entire application using only one 
> module, as we add new functionality, compile times will continue to increase.
>   With the modular approach, functionality is divided into modules. modules 
> can be compiled independently thereby reducing compile times.
>   Correct me if my understanding is wrong.

I have an application which has an estimated 300,000 lines of code in close to 
1400 classes. Debug compile times are generally less than 10 seconds.

That said, I’d like for us to add incremental compiles which should make 
updates basically instant.




Re: Load time is very slow

2021-12-27 Thread Harbs
If you could try out the feature/ROYALE_INTERFACE_INFO branch and let me know 
if that helps, it would be very helpful.

You need to pull that branch both for royale-compiler and royale-asjs.


> On Dec 27, 2021, at 2:04 PM, Roman Isitua  wrote:
> 
> So I definitely need to figure out how to get modules working with 
> minification. 
> 
> I have also been following the threads on the developer list on minification. 



Re: Load time is very slow

2021-12-27 Thread Harbs


> On Dec 27, 2021, at 2:04 PM, Roman Isitua  wrote:
> 
> - compile times. With modules as I am adding new features to the app, compile 
> times will not be affected too much.
>  This is very useful for my small team. We are not using the latest 
> workstation with bleeding edge processors. My laptop uses
> a 2017 core i7 processor. My other team members have slightly lower specs 
> than mine. So compile time is something that we 
> are mindful of.

Compile times of debug builds should be very fast. What compile times are you 
seeing?

If compile times are slow, we should work on fixing that...

> - modules make it easier to share development tasks.

Why? We don’t have issues sharing tasks on the same application. I’d like to 
understand better why this is an issue for you.

> I want to believe there will be performance benefits as well. e.g. faster 
> load times and memory e.t.c

I don’t think there will be. I think the opposite might be true.

Re: Gett started with Royale with Intellij

2021-12-09 Thread Harbs
I know Greg is using IntelliJ. Greg do you have time to fill out that page?

> On Dec 9, 2021, at 4:28 PM, Vincent Jugé  wrote:
> 
> Hello,
> 
> As I have a some spare time, I would like to try Royale using Intellij IDE 
> but the "Intellij set up" wiki page 
> (https://github.com/apache/royale-asjs/wiki/IntelliJ-IDEA) is empty.
> 
> Does someone know if there is an existing tutorial on this subject ?
> 
> Thank you.
> 
> Vincent.
> 



Re: Nuevo control Jewel TriStateCheckBox

2021-12-08 Thread Harbs
Great work! :-)

Harbs

> On Dec 9, 2021, at 4:13 AM, Maria Jose Esteve  wrote:
> 
> Hi,
> I wanted to share the new Jewel TriStateCheckBox control, a Jewel CheckBox, 
> only Js, with 3 states: Checked, Unchecked and Indeterminate.
>  
> It can be configured with the indeterminate look, which we are all used to, 
> or with a rejected look (with a dash symbol in the middle) by setting the 
> rejectedVersion property to true.
> By default, the "unchecked" state is assigned a value of "0", the "checked" 
> state a value of "1" and the "indeterminate" state a value of "-1". 
> With the TriStateCheckBoxStatesValues bead we can set a custom value for each 
> state.
> To set the state "selected" we use selected=true, to set the state 
> "deselected" we use selected=false, and to set the state "indeterminate" we 
> use indeterminate=true. (indeterminate=false sets the default state to 
> "deselected")
> The state can be obtained by retrieving the state property or by using the 
> functions: isChecked(), isUnChecked() and isIndeterminate()
> Distinguishes state changes set by code, valueCommit event, from changes made 
> by the user, clickCommit event.
> With the TriStateCheckBoxLabelState bead we can display a different text for 
> each state.
>  
> An example has been added to the TDJ [1]
>  
> I hope it is useful to you.
>  
> [1] 
> https://github.com/apache/royale-asjs/blob/develop/examples/jewel/TourDeJewel/src/main/royale/TriStateCheckBoxPlayGround.mxml
>  
> <https://github.com/apache/royale-asjs/blob/develop/examples/jewel/TourDeJewel/src/main/royale/TriStateCheckBoxPlayGround.mxml>
>  
> Hiedra



Re: Global data transfer objects in a crux app

2021-12-02 Thread Harbs
Responses inline.

> On Dec 2, 2021, at 12:22 AM, Roman Isitua  wrote:
> 
> I have started development using crux with modules. My current observation is 
> that crux initialize classes defined in the beans.xml of the child module.
> 
> 
> To share data between modules e.g. parent and child are recently discovered 
> the local shared object functionality.  I tried it, it works.
> 
> You comments raises a few concerns for me namely:
> 
> 1. Are you suggesting I should not make the app multi module ? If yes what is 
> the alternative ?

Compile everything into a single app. I have a number of swcs for pieces of my 
projects, but the final app is a single compile. I have found very little 
reason to use modules in Royale (even for an app with hundreds of thousands of 
lines of code). In Flash, each component added considerably to the size of your 
app. In Royale, there’s very little bloat when adding UI. I think you’ll find 
the whole Royale application including all the “modules” will be considerably 
smaller than just your main Flex application in Flash. Using modules will 
probably just make your life more difficult and cause your app to load slower.

> 2. What's the difference between debug and release builds ? 

Release build minifies all the Javascript into a single file and often renames 
things. You can control how much renaming is done using the compiler options: 
https://apache.github.io/royale-docs/compiler/compiler-options

> 
> 3. Can I run the app in production using the debug builds ? The app will be 
> in testing phase and beta phase for a while before being released.

You can run it, but it will be MUCH slower to load. You need to load each as 
and mxml file as a separate js file. It’s good for debugging because you can 
see exactly where the code is, but not so good for performance.
> 
> 
> On Wed, 1 Dec 2021, 20:58 Greg Dove,  > wrote:
> 
> It is fair to say that Crux has not been tested with modules. But also 
> current modules support is not yet reliable and needs additional work 
> (community contributors are definitely welcome) - they might work for debug 
> builds, but they are not currently a working solution for release builds.
> 
> 
> 
> 
> On Thu, Dec 2, 2021 at 7:03 AM Roman Isitua  > wrote:
> My application is  multi module and crux based. In my main module, I have a 
> class ConfigData that holds app configuration.  The ConfigData class is 
> declared in the crux beans.xml file.  This class is initialized during 
> application start up. A call to a web service fetches the data and populates 
> this class.
> 
>  Whenever the app switches modules from the main module (i.e. parent crux 
> module) to another module ( i.e. a child crux module), I notice that the 
> configData instance is null. This happens even when I have injected the 
> configData instance in the class that uses configData..
> 
> So my questions are:
> 
> 1. How can an instance initialized in a parent crux module be referenced in a 
> child module ? 
> 
> 2. How can I share data between modules in a crux app ?
> 
> 
> Regards,



Re: Royale with Material design lite

2021-09-29 Thread Harbs
You need to remove yourself.

https://royale.apache.org/mailing-lists/

To unsubscribe from the user list send an email to:
users-unsubscr...@royale.apache.org



> On Sep 29, 2021, at 11:57 AM, Gareth J. Rubery  
> wrote:
> 
> Please remove me from this mailing list, thank you. 
> 
>> On 29 Sep 2021, at 09:27, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> Interesting. Thanks for this information. I will definitely investigate 
>> this. 
>> 
>> 
>> 
>> On Wed, 29 Sep 2021, 08:43 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> AN alternate to pagination is infinite scrolling which we have here:
>> http://royale.apache.org/asdoc/#!org.apache.royale.html.beads/InfiniteVScroller
>>  
>> <http://royale.apache.org/asdoc/#!org.apache.royale.html.beads/InfiniteVScroller>
>> 
>> Basically, you listen to the scrollEnd event and load more content. Make 
>> sure you append to the dataProvider rather than replace it…
>> 
>>> On Sep 28, 2021, at 3:31 PM, Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> 
>>> 
>>> I intend to fetch data from a table with a huge number of records. Is there 
>>> support for data pagination in a material design table ?
>>> 
>>>  Also do I need to write some extra code for the remote object ?
>>> 
>>> 
>>> 
>>> Regards,
>>> 
>>> Roman.
>>> 
>>> On Mon, Sep 13, 2021 at 10:51 AM Roman Isitua >> <mailto:romanisi...@gmail.com>> wrote:
>>> Okay.
>>> 
>>> 
>>> On Mon, 13 Sep 2021, 10:31 Harbs, >> <mailto:harbs.li...@gmail.com>> wrote:
>>> It’s not built by or published to Maven. You can include a SWC in any 
>>> project.
>>> 
>>>> On Sep 13, 2021, at 11:41 AM, Roman Isitua >>> <mailto:romanisi...@gmail.com>> wrote:
>>>> 
>>>> Thanks for sharing Harbs.
>>>> This is another impressive ui library.
>>>> 
>>>> 
>>>> Just one observation. It appears not to have support for maven. Is this 
>>>> correct ?
>>>> 
>>>> 
>>>> Regards,
>>>> 
>>>> 
>>>> 
>>>> On Mon, 13 Sep 2021, 08:49 Harbs, >>> <mailto:harbs.li...@gmail.com>> wrote:
>>>> https://github.com/unhurdle/spectrum-royale 
>>>> <https://github.com/unhurdle/spectrum-royale>
>>>> https://unhurdle.github.io/spectrum-royale/ 
>>>> <https://unhurdle.github.io/spectrum-royale/>
>>>> 
>>>>> On Sep 13, 2021, at 10:22 AM, Piotr Zarzycki >>>> <mailto:piotrzarzyck...@gmail.com>> wrote:
>>>>> 
>>>>> Harbs I believe you have some links and examples - you did that 
>>>>> implementation - I'm just mentioning that cause it could be a good 
>>>>> addition for evaluation for you. ;) 
>>>>> 
>>>> 
>>> 
>> 
> 



Re: Royale with Material design lite

2021-09-29 Thread Harbs
AN alternate to pagination is infinite scrolling which we have here:
http://royale.apache.org/asdoc/#!org.apache.royale.html.beads/InfiniteVScroller

Basically, you listen to the scrollEnd event and load more content. Make sure 
you append to the dataProvider rather than replace it…

> On Sep 28, 2021, at 3:31 PM, Roman Isitua  wrote:
> 
> 
> I intend to fetch data from a table with a huge number of records. Is there 
> support for data pagination in a material design table ?
> 
>  Also do I need to write some extra code for the remote object ?
> 
> 
> 
> Regards,
> 
> Roman.
> 
> On Mon, Sep 13, 2021 at 10:51 AM Roman Isitua  <mailto:romanisi...@gmail.com>> wrote:
> Okay.
> 
> 
> On Mon, 13 Sep 2021, 10:31 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> It’s not built by or published to Maven. You can include a SWC in any project.
> 
>> On Sep 13, 2021, at 11:41 AM, Roman Isitua > <mailto:romanisi...@gmail.com>> wrote:
>> 
>> Thanks for sharing Harbs.
>> This is another impressive ui library.
>> 
>> 
>> Just one observation. It appears not to have support for maven. Is this 
>> correct ?
>> 
>> 
>> Regards,
>> 
>> 
>> 
>> On Mon, 13 Sep 2021, 08:49 Harbs, > <mailto:harbs.li...@gmail.com>> wrote:
>> https://github.com/unhurdle/spectrum-royale 
>> <https://github.com/unhurdle/spectrum-royale>
>> https://unhurdle.github.io/spectrum-royale/ 
>> <https://unhurdle.github.io/spectrum-royale/>
>> 
>>> On Sep 13, 2021, at 10:22 AM, Piotr Zarzycki >> <mailto:piotrzarzyck...@gmail.com>> wrote:
>>> 
>>> Harbs I believe you have some links and examples - you did that 
>>> implementation - I'm just mentioning that cause it could be a good addition 
>>> for evaluation for you. ;) 
>>> 
>> 
> 



Re: Introducing asformat

2021-09-22 Thread Harbs
Totally agree! B-)

> On Sep 22, 2021, at 8:54 PM, Andrew Wetmore  wrote:
> 
> totally cool.
> 
> On Wed, Sep 22, 2021 at 2:43 PM Josh Tynjala  > wrote:
> Hey everyone,
> 
> I recently created asformat, which is a formatter for ActionScript code. It 
> is based on the Royale compiler's lexer that creates a stream of tokens. One 
> nice thing about working with the token stream versus a full AST (Abstract 
> Syntax Tree) is that it's easier to keep track of existing whitespace to 
> preserve it where appropriate.
> 
> In addition to command line usage, this formatter is intended to eventually 
> be used by IDEs/editors, such as VSCode and Moonshine.
> 
> You can find asformat in nightly builds for now. I'm still testing it with 
> existing codebases, but I wanted to share my progress so that others could 
> check it out, if interested.
> 
> Usage:
> 
> Format a file, and write it back to the file system:
> 
> asformat --write-files src/com/example/MyClass.as
> 
> Alternatively, format all .as files in a directory:
> 
> asformat --write-files src
> 
> Options:
> 
> --write-files: Writes the formatting changes back to the original files. If a 
> file has no formatting changes, it will not be modified. Alias: -w. Default: 
> false.
> 
> --list-files: Lists the files that have been changed by formatting. If a file 
> has no formatting changes, it won't be listed. Alias: -l. Default: false.
> 
> --insert-spaces: Indents with spaces instead of tabs. (Default: false)
> 
> --tab-width: The width of tabs when insert-spaces is specified. (Default: 4)
> 
> --insert-final-new-line: Adds a final empty line at the end of the file, if 
> one doesn't exist already. (Default: false)
> 
> --open-brace-new-line: Controls whether an opening curly brace is placed on a 
> new line, or is "cuddled" on the current line. (Default: true)
> 
> --insert-space-for-loop-semicolon: Controls whether a space is inserted after 
> the semicolons in a for() loop. (Default: true)
> 
> --insert-space-control-flow-keywords: Controls whether a space is inserted 
> between control flow keywords (like if, for, while) and the following ( open 
> parenthesis. (Default: true)
> 
> --insert-space-anonymous-function-keyword: Controls whether a space is 
> inserted between the function keyword and the following ( open parenthesis, 
> if the function is anonymous (if it doesn't have a name). (Default: false)
> 
> --insert-space-binary-operators: Controls whether a space is inserted before 
> and after binary operators (like +, -, *, /, &&, ||, etc.) (Default: true)
> 
> --insert-space-comma-delimiter: Controls whether a space is inserted after 
> comma delimiters in Object and Array literals. (Default: true)
> 
> --collapse-empty-blocks: Controls whether empty blocks are collapsed so that 
> the opening and closing curly brace are both on the same line or not. 
> (Default: false)
> 
> --max-preserve-new-lines: Specify the maximum number of new line characters 
> that are allowed to appear consecutively. (Default: 2)
> 
> --semicolons: Controls how semicolons are handled. Valid values are insert, 
> remove, and ignore. Insert means that missing semicolons are inserted. Remove 
> means that all semicolons are removed, and ignore means that there is no 
> change to semicolons in the file. (Default: insert)
> 
> Additional notes:
> 
> If neither --write-files nor --list-files is specified, the formatted source 
> code is written to standard output instead.
> 
> If no files are specified, asformat waits for standard input instead.
> 
> --
> Josh Tynjala
> Bowler Hat LLC 
> 
> 
> -- 
> Andrew Wetmore
> 
> http://cottage14.blogspot.com/ 
> 
> 
> 
> 



Re: Royale with Material design lite

2021-09-13 Thread Harbs
It’s not built by or published to Maven. You can include a SWC in any project.

> On Sep 13, 2021, at 11:41 AM, Roman Isitua  wrote:
> 
> Thanks for sharing Harbs.
> This is another impressive ui library.
> 
> 
> Just one observation. It appears not to have support for maven. Is this 
> correct ?
> 
> 
> Regards,
> 
> 
> 
> On Mon, 13 Sep 2021, 08:49 Harbs,  <mailto:harbs.li...@gmail.com>> wrote:
> https://github.com/unhurdle/spectrum-royale 
> <https://github.com/unhurdle/spectrum-royale>
> https://unhurdle.github.io/spectrum-royale/ 
> <https://unhurdle.github.io/spectrum-royale/>
> 
>> On Sep 13, 2021, at 10:22 AM, Piotr Zarzycki > <mailto:piotrzarzyck...@gmail.com>> wrote:
>> 
>> Harbs I believe you have some links and examples - you did that 
>> implementation - I'm just mentioning that cause it could be a good addition 
>> for evaluation for you. ;) 
>> 
> 



Re: Royale with Material design lite

2021-09-13 Thread Harbs
https://github.com/unhurdle/spectrum-royale
https://unhurdle.github.io/spectrum-royale/

> On Sep 13, 2021, at 10:22 AM, Piotr Zarzycki  
> wrote:
> 
> Harbs I believe you have some links and examples - you did that 
> implementation - I'm just mentioning that cause it could be a good addition 
> for evaluation for you. ;) 
> 



Re: Errors building stand alone actionscript library

2021-09-03 Thread Harbs
You’re missing Collections (and likely others) from your pom.

> On Sep 2, 2021, at 11:58 PM, Roman Isitua  wrote:
> 
> 



Re: Strange runtime error With AMF and Moonshine

2021-04-06 Thread Harbs
What’s the bug? Was it using classes you did or didn’t import?

> On Apr 6, 2021, at 12:03 PM, David Slotemaker de Bruine 
>  wrote:
> 
> Hi All,
> 
> I have found the culprit. It has nothing to do with Moonshine, but seems to 
> be a "Feature" of the Compiler. I am not sure where I should file this 
> problem.
> 
> The problem stemmed from one of my ItemRenderers buried deep in the 
> application that I modified recently that somehow had the following line.
> 
> import org.apache.royale.net.remoting.messages.ErrorMessage;
> 
> I was trying to import "Error" and at some point I imported "ErrorMessage" by 
> mistake. Everything compiles fine. BUT I think that because the import  
> includes: "org.apache.royale.net.remoting"
> 
> this causes the compiler to use this set of classes INSTEAD of the MX 
> classes. Causing the error I was receiving at run time! 
> 
> Where should I send this information?
> 
> David
> 
> 
> 
> On Thu, 1 Apr 2021 at 13:15, David Slotemaker de Bruine 
> mailto:dslotema...@vicensvives.com>> wrote:
> Hi all again, I have been trying to solve this error and I am getting closer.
> 
> Making the same call using the same backend with a different (non CRUX) 
> project works fine.
> 
> The server returns the correct object in both cases (checked via charles 
> proxy).
> 
> I also eliminated the use of "serviceHelper.executeServiceCall" by injecting 
> the remote object directly into the Controller ad add event listeners there. 
> This also causes the same 
> "Was expecting mx.messaging.messages.AcknowledgeMessage" error.
> 
> Stepping through the executing stack I have found the error here within the 
> "NetConnectionChannel.js" file line 434.
> 
>  if (org.apache.royale.utils.Language.is 
> (msg, 
> mx.messaging.messages.AsyncMessage)) {
> 
> For some reason the format of msg at this point is:
> 
> org.apache.royale.net.remoting.messages.AcknowledgeMessage
> 
>   this  causes the else condition (line 446) to trigger and return a 
> mx.FaultEvent.
> 
> My question is what could be causing ApacheRoyal to convert 
> 
> flex.messaging.messages.AcknowledgeMessage
>  to 
> org.apache.royale.net.remoting.messages.AcknowledgeMessage 
> 
> instead of  mx.messaging.messages.AsyncMessage
> 
> Do I have an import in some file that is causing this?
> 
> Any help would be great!
> 
> 
> 
> 
> On Thu, 25 Mar 2021 at 18:08, Piotr Zarzycki  > wrote:
> Could it be that Moonshine has download a new version of the SDK 
> automatically? 
> 
> No it's not possible.  
> 
> czw., 25 mar 2021 o 18:02 David Slotemaker de Bruine 
> mailto:dslotema...@vicensvives.com>> napisał(a):
> I have been busy coding away today and everything has run great.
> 
> All of a sudden the server call response for logging in returns correctly 
> (visible in Charles) But the the fault event is execute in Royal, the Fault 
> message is shown below.
> 
> I have restarted both Moonshine and the webserver. Could it be that Moonshine 
> has download a new version of the SDK automatically? I was also getting 
> strange import warning message (Like it couldn't find custom MXML tags) in 
> Moonshine that appeared at random and dissapeared just as easily.
> 
> The error message is:
> 
> Was expecting mx.messaging.messages.AcknowledgeMessage, but received 
> org_apache_royale_net_remoting_messages_AbstractMessage__body: [object Object]
> org_apache_royale_net_remoting_messages_AsyncMessage__correlationId: 
> A851B89E-E780-FA11-83B4-605CBF96A156
> org_apache_royale_net_remoting_messages_AsyncMessage_correlationIdBytes: null
> org_apache_royale_net_remoting_messages_AbstractMessage__timestamp: 
> 1616691094852
> org_apache_royale_net_remoting_messages_AbstractMessage__headers: [object 
> Object]
> org_apache_royale_net_remoting_messages_AbstractMessage__messageId: 
> FB84833B-040E-C228-2D21-FD2BBA079250
> org_apache_royale_net_remoting_messages_AbstractMessage_messageIdBytes: null
> org_apache_royale_net_remoting_messages_AbstractMessage__timeToLive: 0
> org_apache_royale_net_remoting_messages_AbstractMessage__clientId: 
> FB848211-2A0D-71E2-3F9D-EB16532C14A5
> org_apache_royale_net_remoting_messages_AbstractMessage_clientIdBytes: null
> org_apache_royale_net_remoting_messages_AbstractMessage__destination: null
> constructor: function() {
>   org.apache.royale.net 
> .remoting.messages.AcknowledgeMessage.base(this,
>  'constructor');
> }
> getSmallMessage: function() {
>   
> org.apache.royale.utils.Language.trace("AcknowledgeMessage.getSmallMessage");
>   var /** @type {Object} */ o = this;
>   if (o.constructor == org.apache.royale.net 
> .remoting.messages.AcknowledgeMessage)
> return new org.apache.royale.net 
> .remoting.messages.AcknowledgeMessageExt(this);
>   return null;
> }
> readExternal: function(input) {
>   org.apache.royale.net 
> 

Re: CSS variables error

2021-03-17 Thread Harbs
Anything in here:
https://www.w3.org/Style/CSS/specs.en.html

> On Mar 17, 2021, at 2:34 PM, Maria Jose Esteve  wrote:
> 
> Hahahaha, Do you notice that I am learning EVERYTHING? , I'm going to find 
> out what “plain vanilla” is and I'll tell you.
>  
> Thanks Harbs
> Hiedra
>  
> De: Harbs  
> Enviado el: miércoles, 17 de marzo de 2021 13:30
> Para: users@royale.apache.org
> Asunto: Re: CSS variables error
>  
> It needs to be a plain vanilla (HTML style) CSS file.
>  
> Namespaces are not recognized in regular css.
> 
> 
> On Mar 17, 2021, at 10:21 AM, Maria Jose Esteve  <mailto:mjest...@iest.com>> wrote:
>  
> My external CSS file is "assets / css / initializations.css" and I add it to 
> the html template before "$ {application} .css":
>  
>  href="assets/css/initializations.css">
> 
>  
> Test 1 - In the initializations.css file I include only the definition of the 
> variables (it seemed that was what caused the error) - It does not work.
>  
>  
> @namespace "http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>";
> @namespace j "library://ns.apache.org/royale/jewel 
> ";
>  
>   .global { 
> --pricolordark: #2196F3;
> --pricolorlight: #BBDEFA;
>   }
>  
>  
> Test 2 - In the initializations.css file I include the definition of the 
> variables and all those styles that refer to them. In this case it "compiles" 
> but does not recognize the assigned values. For example:
>  
> @namespace "http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>";
> @namespace j "library://ns.apache.org/royale/jewel 
> ";
>  
>   .global { 
> --pricolordark: #2196F3;
> --pricolorlight: #BBDEFA;
>   }
>  
>   .jewel.topappbar .topBarAppHeader {
> background: val(--pricolordark);
>   }
>  
> I will comment on github, as you suggest, because I doubt that I will be able 
> to add it to the compiler 
>  
> Thx Harbs.
>  
> Hiedra
>  
> De: Maria Jose Esteve mailto:mjest...@iest.com>> 
> Enviado el: miércoles, 17 de marzo de 2021 8:41
> Para: users@royale.apache.org <mailto:users@royale.apache.org>
> Asunto: RE: CSS variables error
>  
> Hi,
> @Harbs, I'm going to try it again, it could be a “FALSE NEGATIVE” (a phrase 
> that I'm getting used to lately ) or simply that she “was asleep”….
> Now I tell you.
>  
> Hiedra
>  
> De: Harbs mailto:harbs.li...@gmail.com>> 
> Enviado el: miércoles, 17 de marzo de 2021 7:26
> Para: users@royale.apache.org <mailto:users@royale.apache.org>
> Asunto: Re: CSS variables error
>  
>  It seems that the solution was to create an external css that would not go 
> into the compilation process but this does not work here.
>  
> Wait. Missed this line. Why wouldn’t it work?
>  
> 
> On Mar 17, 2021, at 1:08 AM, Maria Jose Esteve  <mailto:mjest...@iest.com>> wrote:
>  
> Hello,
> I am trying to use "variables" in my default CSS but not succeeding, when 
> compiling I get an error:
> Error: Unexpected exception 'java.util.NoSuchElementException' at 
> org.antlr.runtime.misc.LookaheadStream.LB:159
>  
> I have tried declaring them in ": root", ".global" and ".Application" but I 
> always get the same error.
> For example:
>  
>   .global { 
> --pricolordark: #2196F3;
> --pricolorlight: #BBDEFA;
>   }
>   .jewel.topappbar .topBarAppHeader {
> background: val(--pricolordark);
>   }
>  
> I have found a thread from the old FlexJS forum where Harb and Greg comment 
> the same error but with the "calc" function. It seems that the solution was 
> to create an external css that would not go into the compilation process but 
> this does not work here.
> any ideas? Do you know if they can be used?
>  
> Thanks.
>  
> Hiedra.



Re: CSS variables error

2021-03-17 Thread Harbs
It needs to be a plain vanilla (HTML style) CSS file.

Namespaces are not recognized in regular css.

> On Mar 17, 2021, at 10:21 AM, Maria Jose Esteve  wrote:
> 
> My external CSS file is "assets / css / initializations.css" and I add it to 
> the html template before "$ {application} .css":
>  
>  href="assets/css/initializations.css">
> 
>  
> Test 1 - In the initializations.css file I include only the definition of the 
> variables (it seemed that was what caused the error) - It does not work.
>  
>  
> @namespace "http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>";
> @namespace j "library://ns.apache.org/royale/jewel 
> ";
>  
>   .global { 
> --pricolordark: #2196F3;
> --pricolorlight: #BBDEFA;
>   }
>  
>  
> Test 2 - In the initializations.css file I include the definition of the 
> variables and all those styles that refer to them. In this case it "compiles" 
> but does not recognize the assigned values. For example:
>  
> @namespace "http://www.w3.org/1999/xhtml <http://www.w3.org/1999/xhtml>";
> @namespace j "library://ns.apache.org/royale/jewel 
> ";
>  
>   .global { 
> --pricolordark: #2196F3;
> --pricolorlight: #BBDEFA;
>   }
>  
>   .jewel.topappbar .topBarAppHeader {
> background: val(--pricolordark);
>   }
>  
> I will comment on github, as you suggest, because I doubt that I will be able 
> to add it to the compiler 
>  
> Thx Harbs.
>  
> Hiedra
>  
> De: Maria Jose Esteve  
> Enviado el: miércoles, 17 de marzo de 2021 8:41
> Para: users@royale.apache.org
> Asunto: RE: CSS variables error
>  
> Hi,
> @Harbs, I'm going to try it again, it could be a “FALSE NEGATIVE” (a phrase 
> that I'm getting used to lately ) or simply that she “was asleep”….
> Now I tell you.
>  
> Hiedra
>  
> De: Harbs mailto:harbs.li...@gmail.com>> 
> Enviado el: miércoles, 17 de marzo de 2021 7:26
> Para: users@royale.apache.org <mailto:users@royale.apache.org>
> Asunto: Re: CSS variables error
>  
>  It seems that the solution was to create an external css that would not go 
> into the compilation process but this does not work here.
>  
> Wait. Missed this line. Why wouldn’t it work?
>  
> 
> On Mar 17, 2021, at 1:08 AM, Maria Jose Esteve  <mailto:mjest...@iest.com>> wrote:
>  
> Hello,
> I am trying to use "variables" in my default CSS but not succeeding, when 
> compiling I get an error:
> Error: Unexpected exception 'java.util.NoSuchElementException' at 
> org.antlr.runtime.misc.LookaheadStream.LB:159
>  
> I have tried declaring them in ": root", ".global" and ".Application" but I 
> always get the same error.
> For example:
>  
>   .global { 
> --pricolordark: #2196F3;
> --pricolorlight: #BBDEFA;
>   }
>   .jewel.topappbar .topBarAppHeader {
> background: val(--pricolordark);
>   }
>  
> I have found a thread from the old FlexJS forum where Harb and Greg comment 
> the same error but with the "calc" function. It seems that the solution was 
> to create an external css that would not go into the compilation process but 
> this does not work here.
> any ideas? Do you know if they can be used?
>  
> Thanks.
>  
> Hiedra.



Re: CSS variables error

2021-03-17 Thread Harbs
>  It seems that the solution was to create an external css that would not go 
> into the compilation process but this does not work here.

Wait. Missed this line. Why wouldn’t it work?

> On Mar 17, 2021, at 1:08 AM, Maria Jose Esteve  wrote:
> 
> Hello,
> I am trying to use "variables" in my default CSS but not succeeding, when 
> compiling I get an error:
> Error: Unexpected exception 'java.util.NoSuchElementException' at 
> org.antlr.runtime.misc.LookaheadStream.LB:159
>  
> I have tried declaring them in ": root", ".global" and ".Application" but I 
> always get the same error.
> For example:
>  
>   .global { 
> --pricolordark: #2196F3;
> --pricolorlight: #BBDEFA;
>   }
>   .jewel.topappbar .topBarAppHeader {
> background: val(--pricolordark);
>   }
>  
> I have found a thread from the old FlexJS forum where Harb and Greg comment 
> the same error but with the "calc" function. It seems that the solution was 
> to create an external css that would not go into the compilation process but 
> this does not work here.
> any ideas? Do you know if they can be used?
>  
> Thanks.
>  
> Hiedra.



Re: CSS variables error

2021-03-17 Thread Harbs
The compiler needs to understand the css in order to compile it. Any features 
that the compiler doesn’t understand need to be added to the compiler. 
Definitely add this as a Github issue.

To use unsupported CSS features, you need a CSS file which is not run through 
the compiler. What I do is add a “defaults.css” file where I put that kind of 
CSS and add the following line to my template html file:

 compiling I get an error:
> Error: Unexpected exception 'java.util.NoSuchElementException' at 
> org.antlr.runtime.misc.LookaheadStream.LB:159
>  
> I have tried declaring them in ": root", ".global" and ".Application" but I 
> always get the same error.
> For example:
>  
>   .global { 
> --pricolordark: #2196F3;
> --pricolorlight: #BBDEFA;
>   }
>   .jewel.topappbar .topBarAppHeader {
> background: val(--pricolordark);
>   }
>  
> I have found a thread from the old FlexJS forum where Harb and Greg comment 
> the same error but with the "calc" function. It seems that the solution was 
> to create an external css that would not go into the compilation process but 
> this does not work here.
> any ideas? Do you know if they can be used?
>  
> Thanks.
>  
> Hiedra.



Re: WebBrowser vs IFrame

2021-02-23 Thread Harbs
The issue is that you’re attaching the event listener to the component or the 
element.

postMessage is always fired on a Window object and you need to listen to the 
Window you are posting the message to.

If you are in an iframe, window.parent is the immediate parent Window which 
holds the iframe. window.top is the top-most window in the heirarchy 
(significant when you have nested iframes).

As long as you post to and attach the event listener to the correct Window 
object, you should be fine with going both into and out of an iframe.

Assuming you have only a single level of nesting of your iframes, you would use

myIframe.element.contentWindow.parent["postMessage"]("foobaz",'*’); to send a 
message out and in your code you would use 
window.addEventListener(“message”,myHandler);

To go in, you’d use 
myIframe.element.contentWindow.["postMessage"]("foobaz",'*’); and 
myIframe.element.contentWindow.addEventListener(“message”,myOtherHandler); 
Although presumably, you’d be in the inner iframe code and it would just be 
“window”.

HTH,
Harbs

> On Feb 22, 2021, at 9:14 PM, Bilbosax  wrote:
> 
> @Harbs, thanks for responding.  Please be patient because I am very new to
> this.  I have a couple of questions about this approach because it does not
> make sense to me.  I am not trying to communicate between different iframes,
> I am trying to get simple data OUT of an iframe, and back into my
> actionscript.  On the asdocs for IFrame, there is no mention of the event
> "message" in IFrame, and I can't get it to work.  Inside of the IFrame html
> file, I have tried all three of these:
> 
>window["top"]["postMessage"]("foobaz",'*');
>window.parent["postMessage"]("foobaz", '*');
>postMessage("foobaz", '*');
> 
> In Actionscript, I have the following:
> 
>map.addEventListener("message", mapsEventHandler);
> 
>public function mapsEventHandler(event:Event):void {
>trace("I Heard The Message");
>}
> 
>
> 
> In it's simplest form, if the IFrame component was able to hear the
> postMessage from the actionscript side, it should have traced out "I Heard
> The Message".  I know you are good at this stuff, what am I missing?
> 
> 
> 
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/



Re: WebBrowser vs IFrame

2021-02-22 Thread Harbs
The way you communicate between iframes and their parent windows in Javascript 
is by using postMessage.[1]

We don’t have any code which wraps that, but there’s no reason why you can’t 
use the postMessage APIs directly. You’d do something like this:
window["top"]["postMessage"]("foobaz",'*');
window.parent["postMessage"]("foobaz", '*');

or to send a message to the iframe:

myIframe.element.contentWindow["postMessage"]("foobaz",'*’);

To use the message you need to add an event listener to the window that the 
message is posted to. Messages must be content which can be serialized. You can 
also optionally pass a Transferable[2], but I never have actually tried that.

HTH,
Harbs

[1]https://developer.mozilla.org/en-US/docs/Web/API/Window/postMessage
[2]https://developer.mozilla.org/en-US/docs/Web/API/Transferable

> On Feb 22, 2021, at 3:39 AM, Bilbosax  wrote:
> 
> I have come to the final part of my app development that I have feared the
> most.  I will have a lot of questions about this because I am so in the
> dark, so here it goes.
> 
> I need a Google Map in my Royale project.  In Flex, this was done with an
> ANE or in the older days with StageWebView.  You create an HTML document
> that contains the structure for the map as well as the Javascript functions
> that can add or delete markers, add or delete info windows, center the map,
> etc.  The HTML file is then set as the url for the stagewebview, and you
> have yourself a map.  A simple HTML version looks like this:
> 
> 
> 
>  
>
>
> 
>  
>  
>
> 
> 
>  
> 
> 
> The challenge was communicating between the javascript in the StageWebView,
> and the actionscript in Flex.  To talk with the javascript, you would simply
> invoke the javascript protocol in your url, and it would call the function
> after the word "javascript:" like this:
> 
> webView.loadUrl("javascript:addMarker('39.0679459','-86.148456','$350,000')");
> 
> Talking to Actionscript from Javascript was a little tricker.  StageWebView
> throws an event called "locationChanging", so you could basically change the
> location in javascript and throw in a string containing your information to
> parse out and call your function in actionscript.  So in javascript, you
> would have:
> 
> function sendLatLng() {
>location.href = "?lat=" + lat  +"=" + lng;
> }
> 
> and you would catch it in actionscript like this:
> 
> webView.addEventListener(LocationChangeEvent.LOCATION_CHANGING,
> locationChanging);
> 
> function locationChanging(e:LocationChangeEvent):void {
>e.preventDefault();
>var query:String = e.location.split("?")[1];
>var vars:URLVariables = new URLVariables(query);
>trace(vars.lat, var.lng);
> }
> 
> 
> So I have run into a wall using the two components available in Royale to
> make a similar setup, WebBrowser and IFrame.  Both are great, but only seem
> to allow one way communication.  WebBrowser has a "locactionChange" event,
> so I can use it to talk to actionscript the way that I was doing with
> StageWebView, but adding "javascript" to the front of the url property does
> not allow actionscript to call javascript functions.
> 
> IFrame on the otherhand does allow you to add "javascript" to the front of
> the src property, so you can call javascript functions from actionscript,
> but it does not have a "locationChange" event, so I can't send strings from
> javascript to actionscript.
> 
> So I'm stuck.  One component allows me to talk from actionscript to
> javascript, and the other from javascript to actionscript.  But neither does
> both.  I'm kinda amateurish at creating my own classes, but I've tried to
> wrap my head around trying to use @Externs, but the HTML file has to exist
> inside of a webview or iframe component, so I feel trapped within the walls
> of those constructs to get information into or out of those components.
> 
> Am I missing something obvious?  Is there any way that "locationChange"
> could easily be added to the IFrame component, or adding the "javascript:"
> protocol to the url property of the WebBrowser?
> 
> 
> 
> 
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/



Re: AS3 & MXML for VSCode and Mac M1

2021-02-10 Thread Harbs
I got an M1 machine for testing, but I have not yet tried to use VS Code for 
Royale with it.

I’ll likely have an opportunity to do that sometime in the next week.

Harbs

> On Feb 10, 2021, at 11:37 AM, Isabelle LOYER  wrote:
> 
> Hi,
> 
> Could you share your experience about Mac M1 with a project compiling with 
> AS3 & MXML for VSCode.
> 
> Best regards
> 
> 



Re: [EXTERNAL] CSS & JS file versioning

2021-01-23 Thread Harbs
That’s not necessary. All browsers have a checkbox to disable cache while 
devtools are open.

HTH,
Harbs

> On Jan 23, 2021, at 1:58 AM, Brian Raymes  wrote:
> 
> FYI, I have expanded upon this for my debug version as well:
> 
> This adds a timestamp to ever every js reference provided in the debug output 
> to hopefully thwart the cache. I’ve been having to clear my cache a lot 
> lately, and I’m hoping this removes the need.
>  
>   
> com.google.code.maven-replacer-plugin
> replacer
> 1.5.3
> 
>   
> package
> 
>   replace
> 
>   
> 
> 
>   false
>   ${basedir}/target/javascript/bin/js-debug/index.html
>   
> 
>   
>   
> 
> 
>   
>   
> 
>   
> 
>   
>  
>  
>  
> From: Carlos Rovira  
> Sent: Thursday, January 14, 2021 1:27 AM
> To: users@royale.apache.org
> Subject: Re: [EXTERNAL] CSS & JS file versioning
>  
> Thanks Brian,
>  
> very useful!
>  
> Not related, but as well useful, I use maven's build timestamp with defines 
> to get it in AS3 in the following way:
>  
> https://github.com/codeoscopic/avant2-website/blob/b97c62fb583e850e7190b28396e75adb3e7bf22a/avant2-products-companies/pom.xml#L169
>  
> <https://github.com/codeoscopic/avant2-website/blob/b97c62fb583e850e7190b28396e75adb3e7bf22a/avant2-products-companies/pom.xml#L169>
>  
> Best,
>  
> Carlos
>  
> El mar, 12 ene 2021 a las 19:01, Brian Raymes ( <mailto:brian.ray...@teotech.com>>) escribió:
> As others have stated, there are other ways to do this. Here is how I’m doing 
> it with maven:
>  
> In my case, I’m currently using a timestamp to try to avoid caching. Feel 
> free to replace with a version, etc.
>  
> This will update the template and build time.
>  
>   
> ${maven.build.timestamp}
>   
>  
>  
>   
> com.google.code.maven-replacer-plugin
> replacer
> 1.5.3
> 
>   
> package
> 
>   replace
> 
>   
> 
> 
>   false
>   ${basedir}/target/javascript/bin/js-debug/index.html
>   
> 
>   
>   
> 
> 
>   
>   
> 
>   
> 
>   
>  
> Brian
>  
> From: lol lol mailto:massc...@gmx.de>> 
> Sent: Tuesday, January 12, 2021 1:47 AM
> To: users@royale.apache.org <mailto:users@royale.apache.org>
> Subject: [EXTERNAL] CSS & JS file versioning
>  
> Hi All,
>  
> Is there any possibility defined that lets me define my own placeholders in 
> the html-template?
> For example im using an html template with the following line
>  
> 
>  
> Is there anything helpful already existing in the compiler so I can add a 
> version to my css like so:
>  
> href="${application}?v=12345678" />
>  
> Thank!
> 
>  
> -- 
> Carlos Rovira
> Apache Member & Apache Royale PMC
> Apache Software Foundation
> http://about.me/carlosrovira <http://about.me/carlosrovira>


Re: Popup and Databinding

2021-01-18 Thread Harbs
ContainerDataBinding might be more appropriate.

> On Jan 18, 2021, at 4:14 PM, wkoch  wrote:
> 
> I found the issue.  Was missing the ItemRendererDataBinding bead in the popup
> code.
> 
> 
> 
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/



Re: Popup and Databinding

2021-01-17 Thread Harbs
What’s the base for your MXML file?


> On Jan 17, 2021, at 11:44 PM, wkoch  wrote:
> 
> I'm sure I'm missing a bead somewhere...
> 
> I am making a popup programatically.  In that popup I have things that are
> supposed to bind.  I have a datagrid that is populated from a database call
> and a simple label that's bound to a string.
> 
> Nothing is binding……
> 
> 
> 
> 
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/



Re: CSS & JS file versioning

2021-01-12 Thread Harbs
I don’t think we have that yet, but I believe the place to add it would be in 
MXMLRoyalePublisher.java and MXMLApplicationNode.java

Note specifically the following commented lines in MXMLRoyalePublisher.java:

//result = result.replaceAll("\\$\\{version_major\\}", versionMajor);
//result = result.replaceAll("\\$\\{version_minor\\}", versionMinor);
//result = result.replaceAll("\\$\\{version_revision\\}", 
versionRevision);

You’d want to parse out the specific tags and enable the above lines.

> On Jan 12, 2021, at 2:27 PM, lol lol  wrote:
> 
> Indeed, it was more about whether the "html-template" supports own 
> placeholders and versioning per se.
>  
>  
> Gesendet: Dienstag, 12. Januar 2021 um 13:14 Uhr
> Von: "Harbs" 
> An: users@royale.apache.org
> Betreff: Re: CSS & JS file versioning
> I think the question was how to automatically insert the build number into 
> the html (i.e.?v=12345678)
>  
> On Jan 12, 2021, at 1:41 PM, Carlos Rovira  <mailto:carlosrov...@apache.org>> wrote:
>  
> Hi,
>  
> I think you need "htmlTemplate" compiler option. This is how to use in Maven:
>  
> 
> ${basedir}/target/javascript/bin/js-debug/jewel-example-index-template.html
> 
>  
> in command line:
>  
> 
> -html-template=src/main/resources/jewel-example-index-template.html
> 
>  
> or in asconfig:
>  
> 
> "html-template": "src/main/resources/jewel-example-index-template.html"
> 
>  
> HTH
>  
> Carlos
>  
>  
>  
> El mar, 12 ene 2021 a las 10:47, lol lol ( <mailto:massc...@gmx.de>>) escribió:
> Hi All,
>  
> Is there any possibility defined that lets me define my own placeholders in 
> the html-template?
> For example im using an html template with the following line
>  
> 
>  
> Is there anything helpful already existing in the compiler so I can add a 
> version to my css like so:
>  
> href="${application}?v=12345678" />
>  
> Thank!
>  
>  
> --
> Carlos Rovira
> Apache Member & Apache Royale PMC
> Apache Software Foundation
> http://about.me/carlosrovira <http://about.me/carlosrovira>
>  



Re: CSS & JS file versioning

2021-01-12 Thread Harbs
I think the question was how to automatically insert the build number into the 
html (i.e.?v=12345678)

> On Jan 12, 2021, at 1:41 PM, Carlos Rovira  wrote:
> 
> Hi,
> 
> I think you need "htmlTemplate" compiler option. This is how to use in Maven:
> 
> ${basedir}/target/javascript/bin/js-debug/jewel-example-index-template.html
> 
> in command line:
> 
> -html-template=src/main/resources/jewel-example-index-template.html
> 
> or in asconfig:
> 
> "html-template": "src/main/resources/jewel-example-index-template.html"
> 
> HTH
> 
> Carlos
> 
> 
> 
> El mar, 12 ene 2021 a las 10:47, lol lol ( >) escribió:
> Hi All,
>  
> Is there any possibility defined that lets me define my own placeholders in 
> the html-template?
> For example im using an html template with the following line
>  
> 
>  
> Is there anything helpful already existing in the compiler so I can add a 
> version to my css like so:
>  
> href="${application}?v=12345678" />
>  
> Thank!
> 
> 
> -- 
> Carlos Rovira
> Apache Member & Apache Royale PMC
> Apache Software Foundation
> http://about.me/carlosrovira 
> 



Re: New to Royale

2020-11-07 Thread Harbs
Just CSS. All the code is in the components.

> On Nov 6, 2020, at 1:37 PM, Carlos Rovira  wrote:
> 
> It's just CSS or JS too? 
> MDL had both
> 
> El vie., 6 nov. 2020 a las 12:21, Harbs ( <mailto:harbs.li...@gmail.com>>) escribió:
> Yup. The reason I made Spectrum external to Royale is because it relies on 
> third party CSS.
> 
>> On Nov 6, 2020, at 11:56 AM, Carlos Rovira > <mailto:carlosrov...@apache.org>> wrote:
>> 
>> hehe,
>> 
>> yeah! that's good :)
>> 
>> I think approaches are different. I see Spectrum like Material Design Lite 
>> (MDL) library I did some years ago (and another option Bilbosax can check, 
>> that is complete and can be found in Royale libs).
>> 
>> In Spectrum and MDL components, styles and behaviours come from a third 
>> party and component dev must accommodate what's done by the provider. We are 
>> basically wrapping a JS/CSS library with the Royale logic to make it work 
>> inside Royale.
>> 
>> Jewel is more native to royale, and we control every aspect. We're not 
>> wrapping  external sources, but creating our own components that have its 
>> own styling.
>> 
>> Each path has pros and cons. One good thing on the Spectrum/MDL approach is 
>> that third party takes care of usability and CSS/JS use to solve any 
>> problem, we just need to wrap it to make it usable in MXML/AS3, in the other 
>> hand the look and feel is only the one they offer and it's more difficult to 
>> change.
>> 
>> The good thing about Jewel is that we control the behaviours and are more 
>> integrated inside the royale logic and use to be more near to what Flex 
>> provided also is more suitable to look and feel changes through themes. In  
>> exchange we need to fight with all kinds of implementation aspects. What 
>> this means is more work to be done and sometimes more time to reach where 
>> others already reach the goal.
>> 
>> In the end, each set has its own path and timing. For example, in comparison 
>> with latest additions to Spectrum, keyboard navigation is already in Jewel 
>> List, but we still don't have a Menu component.
>> 
>> 
>> 
>> El vie., 6 nov. 2020 a las 9:44, Harbs (> <mailto:harbs.li...@gmail.com>>) escribió:
>> Possibly, but I’m pretty sure Spectrum has components that Jewel is missing. 
>> ;-)
>> 
>> Right now, we’re pretty much finished with a Tag Field component. We’re also 
>> working on keyboard navigation on lists and menus, etc.
>> 
>> Just some friendly competition to keep us both on our toes… ;-p
>> 
>>> On Nov 5, 2020, at 6:08 PM, Carlos Rovira >> <mailto:carlosrov...@apache.org>> wrote:
>>> 
>>> Also probably is the set more developed in the Royale ecosystem.
>> 
>> 
>> 
>> -- 
>> Carlos Rovira
>> Apache Member & Apache Royale PMC
>> Apache Software Foundation
>> http://about.me/carlosrovira <http://about.me/carlosrovira>
>> 
> 
> 
> 
> -- 
> Carlos Rovira
> Apache Member & Apache Royale PMC
> Apache Software Foundation
> http://about.me/carlosrovira <http://about.me/carlosrovira>
> 



Re: New to Royale

2020-11-06 Thread Harbs
Yup. The reason I made Spectrum external to Royale is because it relies on 
third party CSS.

> On Nov 6, 2020, at 11:56 AM, Carlos Rovira  wrote:
> 
> hehe,
> 
> yeah! that's good :)
> 
> I think approaches are different. I see Spectrum like Material Design Lite 
> (MDL) library I did some years ago (and another option Bilbosax can check, 
> that is complete and can be found in Royale libs).
> 
> In Spectrum and MDL components, styles and behaviours come from a third party 
> and component dev must accommodate what's done by the provider. We are 
> basically wrapping a JS/CSS library with the Royale logic to make it work 
> inside Royale.
> 
> Jewel is more native to royale, and we control every aspect. We're not 
> wrapping  external sources, but creating our own components that have its own 
> styling.
> 
> Each path has pros and cons. One good thing on the Spectrum/MDL approach is 
> that third party takes care of usability and CSS/JS use to solve any problem, 
> we just need to wrap it to make it usable in MXML/AS3, in the other hand the 
> look and feel is only the one they offer and it's more difficult to change.
> 
> The good thing about Jewel is that we control the behaviours and are more 
> integrated inside the royale logic and use to be more near to what Flex 
> provided also is more suitable to look and feel changes through themes. In  
> exchange we need to fight with all kinds of implementation aspects. What this 
> means is more work to be done and sometimes more time to reach where others 
> already reach the goal.
> 
> In the end, each set has its own path and timing. For example, in comparison 
> with latest additions to Spectrum, keyboard navigation is already in Jewel 
> List, but we still don't have a Menu component.
> 
> 
> 
> El vie., 6 nov. 2020 a las 9:44, Harbs ( <mailto:harbs.li...@gmail.com>>) escribió:
> Possibly, but I’m pretty sure Spectrum has components that Jewel is missing. 
> ;-)
> 
> Right now, we’re pretty much finished with a Tag Field component. We’re also 
> working on keyboard navigation on lists and menus, etc.
> 
> Just some friendly competition to keep us both on our toes… ;-p
> 
>> On Nov 5, 2020, at 6:08 PM, Carlos Rovira > <mailto:carlosrov...@apache.org>> wrote:
>> 
>> Also probably is the set more developed in the Royale ecosystem.
> 
> 
> 
> -- 
> Carlos Rovira
> Apache Member & Apache Royale PMC
> Apache Software Foundation
> http://about.me/carlosrovira <http://about.me/carlosrovira>
> 



Re: New to Royale

2020-11-06 Thread Harbs
Possibly, but I’m pretty sure Spectrum has components that Jewel is missing. ;-)

Right now, we’re pretty much finished with a Tag Field component. We’re also 
working on keyboard navigation on lists and menus, etc.

Just some friendly competition to keep us both on our toes… ;-p

> On Nov 5, 2020, at 6:08 PM, Carlos Rovira  wrote:
> 
> Also probably is the set more developed in the Royale ecosystem.



Re: New to Royale

2020-11-05 Thread Harbs
It depends on which component set you use.

I think Jewel has some responsive behavior, but I’m not familiar.

Spectrum has responsive behavior built into the CSS, but the components only 
take minimal advantage of that.

https://github.com/unhurdle/spectrum-royale
https://unhurdle.github.io/spectrum-royale/

When I have time, I’ll probably improve the responsive capabilities.

You can also handle resizing with code.

> On Nov 5, 2020, at 5:49 PM, Bilbosax  wrote:
> 
> Thanks for the info on Moonshine, I will definitely check it out!  Does
> anyone have any thoughts on my other question? Is it possible to make
> responsive apps in Royale kinda like using bootstrap so that your apps look
> good on all devices with as little pain as possible? Any examples or
> tutorials for this??
> 
> 
> 
> 
> 
> --
> Sent from: http://apache-royale-users.20374.n8.nabble.com/



Re: Charts

2020-07-28 Thread Harbs
https://royale.apache.org/using-external-javascript-libraries-in-apache-royale/

Here’s a reference for other frameworks which integrated into echarts: 
https://echarts.apache.org/en/download-extension.html#framework


> On Jul 27, 2020, at 8:20 PM, Maria Jose Esteve  wrote:
> 
> Piotr, where should I start? Do you recommend any integration guide?
> As I have commented, on some other occasion, I do not have an overview of how 
> we interact with js ...
>  
> Hiedra.
>  
> De: Piotr Zarzycki  
> Enviado el: lunes, 27 de julio de 2020 17:31
> Para: users@royale.apache.org
> Asunto: Re: Charts
>  
> Hi Carlos,
>  
> I didn't create typedefs and I won't have time for that - unless I will get 
> some direct task to do that. I have simply injected library trough index.html 
> and created AS3 classes which wrap up ECharts library. - Anyone can do that 
> in their app. - I just wanted to get information out that - ECharts is 
> working nicely with Royale.
>  
> Thanks,
> Piotr
>  
>  
>  
> pon., 27 lip 2020 o 17:18 Carlos Rovira  > napisał(a):
> Hi Piotr, Maria,
>  
> I think we should have an ECharts library in Royale. In this case, I don't 
> see the point for old Flex charts, and others here (like Chris Dutz) already 
> showed interest in it. What do you think about adding your current library 
> effort to Royale? I think many others here could be interested in 
> contributing to it.
>  
> If there's some client restrictions, I think we should plan to add our own.
>  
> Thanks!
>  
> Carlos
>  
>  
>  
> El lun., 27 jul. 2020 a las 15:25, Piotr Zarzycki ( >) escribió:
> Hi Maria,
>  
> I don't think that anyone put effort to emulate mx Charts. What's more it 
> will be difficult to mix them with Jewel, due to CSS conflicts - it's 
> probably doable, but I doubt anyone tried. 
>  
> In our application I didn't even consider using any Charts from Royale -  I 
> went with usage of Apache ECharts [1] - I have finished integrating it with 
> our Jewel app - it's not released yet, but in terms of integration it wasn't 
> too difficult. Maybe this could be your solution. 
>  
> [1] https://echarts.apache.org/ 
>  
> Thanks,
> Piotr
>  
> pon., 27 lip 2020 o 13:12 Maria Jose Esteve  > napisał(a):
> Hello,
> I have to make several Charts (bar and pie) and I was looking at the examples 
> included in the SDK.
>  
> I am doing tests, in my Jewel Application implementing crux, with the Basic 
> Chart controls but I have problems with the dataproviders. Before continuing 
> I wanted to ask you a question ... could you use the mx charts?
>  
> Thank you
> 
>  
> -- 
> Piotr Zarzycki 
> 
> Patreon: https://www.patreon.com/piotrzarzycki 
> 
> 
>  
> -- 
> Carlos Rovira
> http://about.me/carlosrovira 
>  
> 
>  
> -- 
> Piotr Zarzycki 
> 
> Patreon: https://www.patreon.com/piotrzarzycki 
> 


Re: css rule @keyframes

2020-07-16 Thread Harbs
The way I work around CSS compiler bugs until they are fixed is by including a 
separate CSS file that I reference in the app HTML. I include the following in 
the template HTML:




> On Jul 16, 2020, at 1:01 AM, Brian Raymes  wrote:
> 
> As a workaround, you can add any style that doesn’t’ work with the compiler 
> in a  section in your html template. I’ve been doing this for a long 
> while now as it not just keyframes that the compiler doesn’t like.
>  
> For example, in addition to keyframes, to add alternating row colors and 
> custom highlights to lists, I have added the following to my 
> index-template.html file as adding an nth-child() to the css also creates a 
> compilation error.
>  
>