***UNCHECKED*** Re: WARNING

2019-11-01 Thread Alex Harui
No, it is probably that by the time the custom class is static initialized, 
ResourceManager has been loaded.  Getting the order of loading static things 
remains a work in progress.

-Alex

From: Serkan Taş 
Reply-To: "users@royale.apache.org" 
Date: Friday, November 1, 2019 at 2:54 PM
To: "users@royale.apache.org" 
Subject: Re: WARNING

It worked for the test case.

I guess the constant declarations in custom classes are initialized immediately 
 if the class is name referenced in the component even if it is not called.
2.11.2019 00:40 tarihinde Serkan Taş yazdı:
Good to be able to move forward without making so much changes in the original 
code Greg,

Thanks,
Serkan
2.11.2019 00:32 tarihinde Greg Dove yazdı:

Yeah, I have also seen things like that, although not specifically with 
ResourceManager, I recall seeing it with instances of custom classes.
To keep things as close as possible to the original code, the way I have 
addressed this in the past it is to convert the static const into a static 
getter, with the instance constructed the first time the getter is accessed.
private static var _ERROR:String
public static function get ERROR():String { if (_ERROR) return _ERROR;  _ERROR 
= ResourceManager.getInstance().getString('messages', 'error'); return _ERROR }

you could probably opt out of the local private storage variable and simply 
return the value from ResourceManager, but that might change if locale changes 
happen (which I don't know if we support yet, I did not check that).

On Sat, Nov 2, 2019 at 10:21 AM Alex Harui 
mailto:aha...@adobe.com>> wrote:
It may not work to define static constants from ResourceManager.

HTH,
-Alex

From: Serkan Taş 
mailto:serkan@likyateknoloji.com>>
Reply-To: "users@royale.apache.org" 
mailto:users@royale.apache.org>>
Date: Friday, November 1, 2019 at 1:47 PM
To: "users@royale.apache.org" 
mailto:users@royale.apache.org>>
Subject: WARNING

Hi,

Need and advice, I am getting a compiler warning that appears as an exception 
in web console :

WARNING: 
D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/main/mtest/FindBug.js:141:
 WARNING - mx.resources.ResourceManager.getInstance defined before its owner. 
mx.resources.ResourceManager is defined at 
D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/mx/resources/ResourceManager.js:19
main.mtest.FindBug.ERROR = 
mx.resources.ResourceManager.getInstance().getString('messages', 'error');
   


And the exception :

FindBug.js:141 Uncaught TypeError: Cannot read property 'ResourceManager' of 
undefined
at FindBug.js:141
(anonymous) @ FindBug.js:141
SystemManager.js:231 Uncaught TypeError: Cannot read property 'mixins' of 
undefined
at FindBug_mx_managers_SystemManager.mx.managers.SystemManager.start 
(SystemManager.js:231)
at index.html:366

The source piece :


http://ns.adobe.com/mxml/2009;
   
xmlns:s="library://ns.apache.org/royale/spark"
   
xmlns:mx="library://ns.apache.org/royale/mx"
   paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
   height="100%" width="100%"
   creationComplete="onCreationComplete()"
   xmlns:comps="com.likya.pinara.comps.*"
   >


[ResourceBundle("messages")]



































Thanks,
Serkan





Re: WARNING

2019-11-01 Thread Serkan Taş

It worked for the test case.

I guess the constant declarations in custom classes are initialized 
immediately  if the class is name referenced in the component even if it 
is not called.


2.11.2019 00:40 tarihinde Serkan Taş yazdı:
Good to be able to move forward without making so much changes in the 
original code Greg,


Thanks,
Serkan

2.11.2019 00:32 tarihinde Greg Dove yazdı:


Yeah, I have also seen things like that, although not specifically 
with ResourceManager, I recall seeing it with instances of custom 
classes.
To keep things as close as possible to the original code, the way I 
have addressed this in the past it is to convert the static const 
into a static getter, with the instance constructed the first time 
the getter is accessed.

private static var _ERROR:String
public static function get ERROR():String { if (_ERROR) return 
_ERROR;  _ERROR = ResourceManager.getInstance().getString('messages', 
'error'); return _ERROR }


you could probably opt out of the local private storage variable and 
simply return the value from ResourceManager, but that might change 
if locale changes happen (which I don't know if we support yet, I did 
not check that).


On Sat, Nov 2, 2019 at 10:21 AM Alex Harui > wrote:


It may not work to define static constants from ResourceManager.

HTH,

-Alex

*From: *Serkan Taş mailto:serkan@likyateknoloji.com>>
*Reply-To: *"users@royale.apache.org
" mailto:users@royale.apache.org>>
*Date: *Friday, November 1, 2019 at 1:47 PM
*To: *"users@royale.apache.org "
mailto:users@royale.apache.org>>
*Subject: *WARNING

Hi,

Need and advice, I am getting a compiler warning that appears as
an exception in web console :

WARNING:

D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/main/mtest/FindBug.js:141:
WARNING - mx.resources.ResourceManager.getInstance defined before
its owner. mx.resources.ResourceManager is defined at

D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/mx/resources/ResourceManager.js:19
main.mtest.FindBug.ERROR =
mx.resources.ResourceManager.getInstance().getString('messages',
'error');



And the exception :

FindBug.js:141 Uncaught TypeError: Cannot read property
'ResourceManager' of undefined
    at FindBug.js:141
(anonymous) @ FindBug.js:141
SystemManager.js:231 Uncaught TypeError: Cannot read property
'mixins' of undefined
    at
FindBug_mx_managers_SystemManager.mx.managers.SystemManager.start
(SystemManager.js:231)
    at index.html:366

The source piece :


http://ns.adobe.com/mxml/2009;


               xmlns:s="library://ns.apache.org/royale/spark
"
               xmlns:mx="library://ns.apache.org/royale/mx
"
               paddingBottom="0" paddingTop="0" paddingLeft="0"
paddingRight="0"
               height="100%" width="100%"
creationComplete="onCreationComplete()"
xmlns:comps="com.likya.pinara.comps.*"
               >

    
        [ResourceBundle("messages")]
    

    
        
    

    
    

    
        
    

    

    

        

        
            

            
                
            

            
                
            
        

    



Thanks,
Serkan







Re: WARNING

2019-11-01 Thread Serkan Taş
Good to be able to move forward without making so much changes in the 
original code Greg,


Thanks,
Serkan

2.11.2019 00:32 tarihinde Greg Dove yazdı:


Yeah, I have also seen things like that, although not specifically 
with ResourceManager, I recall seeing it with instances of custom classes.
To keep things as close as possible to the original code, the way I 
have addressed this in the past it is to convert the static const into 
a static getter, with the instance constructed the first time the 
getter is accessed.

private static var _ERROR:String
public static function get ERROR():String { if (_ERROR) return _ERROR; 
_ERROR = ResourceManager.getInstance().getString('messages', 'error'); 
return _ERROR }


you could probably opt out of the local private storage variable and 
simply return the value from ResourceManager, but that might change if 
locale changes happen (which I don't know if we support yet, I did not 
check that).


On Sat, Nov 2, 2019 at 10:21 AM Alex Harui > wrote:


It may not work to define static constants from ResourceManager.

HTH,

-Alex

*From: *Serkan Taş mailto:serkan@likyateknoloji.com>>
*Reply-To: *"users@royale.apache.org
" mailto:users@royale.apache.org>>
*Date: *Friday, November 1, 2019 at 1:47 PM
*To: *"users@royale.apache.org "
mailto:users@royale.apache.org>>
*Subject: *WARNING

Hi,

Need and advice, I am getting a compiler warning that appears as
an exception in web console :

WARNING:

D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/main/mtest/FindBug.js:141:
WARNING - mx.resources.ResourceManager.getInstance defined before
its owner. mx.resources.ResourceManager is defined at

D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/mx/resources/ResourceManager.js:19
main.mtest.FindBug.ERROR =
mx.resources.ResourceManager.getInstance().getString('messages',
'error');



And the exception :

FindBug.js:141 Uncaught TypeError: Cannot read property
'ResourceManager' of undefined
    at FindBug.js:141
(anonymous) @ FindBug.js:141
SystemManager.js:231 Uncaught TypeError: Cannot read property
'mixins' of undefined
    at
FindBug_mx_managers_SystemManager.mx.managers.SystemManager.start
(SystemManager.js:231)
    at index.html:366

The source piece :


http://ns.adobe.com/mxml/2009;


               xmlns:s="library://ns.apache.org/royale/spark
"
               xmlns:mx="library://ns.apache.org/royale/mx
"
               paddingBottom="0" paddingTop="0" paddingLeft="0"
paddingRight="0"
               height="100%" width="100%"
               creationComplete="onCreationComplete()"
               xmlns:comps="com.likya.pinara.comps.*"
               >

    
        [ResourceBundle("messages")]
    

    
        
    

    
    

    
        
    

    

    

        

        
            

            
                
            

            
                
            
        

    



Thanks,
Serkan





Fwd: Re: WARNING

2019-11-01 Thread Serkan Taş


My application can not read resources when using this static references 
while it was working in flex and I faced this error while trying to 
prepare a test case about the bug related with this  case.


I may file an issue as you advise.

Thanks,
Serkan


 İletilmiş İleti 
Konu:   Re: WARNING
Tarih:  Fri, 1 Nov 2019 21:30:34 +
Kimden: Alex Harui 
Kime:   Serkan Taş 



We can try to fix the compiler output.  I’m saying that is probably what 
is blocking you right now.  Feel free to open an issue with a small test 
case.


-Alex

*From: *Serkan Taş 
*Date: *Friday, November 1, 2019 at 2:28 PM
*To: *Alex Harui 
*Subject: *Re: WARNING

When I define the static reference in another class and call it in the 
mxml component it works in my original flex application.


From here,

1. I understand I should redesign it for royale.
2. Shouldn't be handled in the compiler step as an error rather than 
warning ?


Thanks,
Serkan

2.11.2019 00:20 tarihinde Alex Harui yazdı:

   It may not work to define static constants from ResourceManager.

   HTH,

   -Alex

   *From: *Serkan Taş 
   
   *Reply-To: *"users@royale.apache.org"
    
   
   *Date: *Friday, November 1, 2019 at 1:47 PM
   *To: *"users@royale.apache.org" 

   *Subject: *WARNING

   Hi,

   Need and advice, I am getting a compiler warning that appears as an
   exception in web console :

   WARNING:
   
D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/main/mtest/FindBug.js:141:
   WARNING - mx.resources.ResourceManager.getInstance defined before
   its owner. mx.resources.ResourceManager is defined at
   
D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/mx/resources/ResourceManager.js:19
   main.mtest.FindBug.ERROR =
   mx.resources.ResourceManager.getInstance().getString('messages',
   'error');
   


   And the exception :

   FindBug.js:141 Uncaught TypeError: Cannot read property
   'ResourceManager' of undefined
    at FindBug.js:141
   (anonymous) @ FindBug.js:141
   SystemManager.js:231 Uncaught TypeError: Cannot read property
   'mixins' of undefined
    at
   FindBug_mx_managers_SystemManager.mx.managers.SystemManager.start
   (SystemManager.js:231)
    at index.html:366

   The source piece :

   
   http://ns.adobe.com/mxml/2009;
   

   xmlns:s="library://ns.apache.org/royale/spark"
   xmlns:mx="library://ns.apache.org/royale/mx"
               paddingBottom="0" paddingTop="0" paddingLeft="0"
   paddingRight="0"
               height="100%" width="100%"
               creationComplete="onCreationComplete()"
               xmlns:comps="com.likya.pinara.comps.*"
               >

    
        [ResourceBundle("messages")]
    

    
        
    

    
    

    
        
    

    

    

        

        
            

            
                
            

            
                
            
        

    

   

   Thanks,
   Serkan






Re: WARNING

2019-11-01 Thread Greg Dove
Yeah, I have also seen things like that, although not specifically with
ResourceManager, I recall seeing it with instances of custom classes.
To keep things as close as possible to the original code, the way I have
addressed this in the past it is to convert the static const into a static
getter, with the instance constructed the first time the getter is accessed.
private static var _ERROR:String
public static function get ERROR():String { if (_ERROR) return _ERROR;
_ERROR = ResourceManager.getInstance().getString('messages', 'error');
return _ERROR }

you could probably opt out of the local private storage variable and simply
return the value from ResourceManager, but that might change if locale
changes happen (which I don't know if we support yet, I did not check that).

On Sat, Nov 2, 2019 at 10:21 AM Alex Harui  wrote:

> It may not work to define static constants from ResourceManager.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *Serkan Taş 
> *Reply-To: *"users@royale.apache.org" 
> *Date: *Friday, November 1, 2019 at 1:47 PM
> *To: *"users@royale.apache.org" 
> *Subject: *WARNING
>
>
>
> Hi,
>
> Need and advice, I am getting a compiler warning that appears as an
> exception in web console :
>
> WARNING:
> D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/main/mtest/FindBug.js:141:
> WARNING - mx.resources.ResourceManager.getInstance defined before its
> owner. mx.resources.ResourceManager is defined at
> D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/mx/resources/ResourceManager.js:19
> main.mtest.FindBug.ERROR =
> mx.resources.ResourceManager.getInstance().getString('messages', 'error');
>
>
>
> And the exception :
>
> FindBug.js:141 Uncaught TypeError: Cannot read property 'ResourceManager'
> of undefined
> at FindBug.js:141
> (anonymous) @ FindBug.js:141
> SystemManager.js:231 Uncaught TypeError: Cannot read property 'mixins' of
> undefined
> at FindBug_mx_managers_SystemManager.mx.managers.SystemManager.start
> (SystemManager.js:231)
> at index.html:366
>
> The source piece :
>
> 
> http://ns.adobe.com/mxml/2009;
> 
>xmlns:s="library://ns.apache.org/royale/spark"
>xmlns:mx="library://ns.apache.org/royale/mx"
>paddingBottom="0" paddingTop="0" paddingLeft="0"
> paddingRight="0"
>height="100%" width="100%"
>creationComplete="onCreationComplete()"
>xmlns:comps="com.likya.pinara.comps.*"
>>
>
> 
> [ResourceBundle("messages")]
> 
>
> 
> 
> 
>
> 
> 
>
> 
>  paddingTop="10" paddingBottom="20" />
> 
>
>  click="button_clickHandler(event)"/>
>
>paddingBottom="10" paddingTop="10" paddingLeft="10"
> paddingRight="10"
>   height="100%" width="100%">
>
>   text="Moving from one form field to another triggers the
> validator."/>
>
> 
> 
>
> 
> 
> 
>
> 
> 
> 
> 
>
> 
>
> 
>
> Thanks,
> Serkan
>
>


Re: WARNING

2019-11-01 Thread Alex Harui
It may not work to define static constants from ResourceManager.

HTH,
-Alex

From: Serkan Taş 
Reply-To: "users@royale.apache.org" 
Date: Friday, November 1, 2019 at 1:47 PM
To: "users@royale.apache.org" 
Subject: WARNING

Hi,

Need and advice, I am getting a compiler warning that appears as an exception 
in web console :

WARNING: 
D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/main/mtest/FindBug.js:141:
 WARNING - mx.resources.ResourceManager.getInstance defined before its owner. 
mx.resources.ResourceManager is defined at 
D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/mx/resources/ResourceManager.js:19
main.mtest.FindBug.ERROR = 
mx.resources.ResourceManager.getInstance().getString('messages', 'error');
   


And the exception :

FindBug.js:141 Uncaught TypeError: Cannot read property 'ResourceManager' of 
undefined
at FindBug.js:141
(anonymous) @ FindBug.js:141
SystemManager.js:231 Uncaught TypeError: Cannot read property 'mixins' of 
undefined
at FindBug_mx_managers_SystemManager.mx.managers.SystemManager.start 
(SystemManager.js:231)
at index.html:366

The source piece :


http://ns.adobe.com/mxml/2009;
   xmlns:s="library://ns.apache.org/royale/spark"
   xmlns:mx="library://ns.apache.org/royale/mx"
   paddingBottom="0" paddingTop="0" paddingLeft="0" paddingRight="0"
   height="100%" width="100%"
   creationComplete="onCreationComplete()"
   xmlns:comps="com.likya.pinara.comps.*"
   >


[ResourceBundle("messages")]



































Thanks,
Serkan



WARNING

2019-11-01 Thread Serkan Taş

Hi,

Need and advice, I am getting a compiler warning that appears as an 
exception in web console :


WARNING: 
D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/main/mtest/FindBug.js:141: 
WARNING - mx.resources.ResourceManager.getInstance defined before its 
owner. mx.resources.ResourceManager is defined at 
D:/dev/royale-emulation-works/github/royale-testing/src/main/mtest/bin/js-debug/mx/resources/ResourceManager.js:19
main.mtest.FindBug.ERROR = 
mx.resources.ResourceManager.getInstance().getString('messages', 'error');




And the exception :

FindBug.js:141 Uncaught TypeError: Cannot read property 
'ResourceManager' of undefined

    at FindBug.js:141
(anonymous) @ FindBug.js:141
SystemManager.js:231 Uncaught TypeError: Cannot read property 'mixins' 
of undefined
    at 
FindBug_mx_managers_SystemManager.mx.managers.SystemManager.start 
(SystemManager.js:231)

    at index.html:366

The source piece :


http://ns.adobe.com/mxml/2009;
               xmlns:s="library://ns.apache.org/royale/spark"
               xmlns:mx="library://ns.apache.org/royale/mx"
               paddingBottom="0" paddingTop="0" paddingLeft="0" 
paddingRight="0"

               height="100%" width="100%"
               creationComplete="onCreationComplete()"
               xmlns:comps="com.likya.pinara.comps.*"
               >

    
        [ResourceBundle("messages")]
    

    
        
    

    
    

    
        paddingTop="10" paddingBottom="20" />

    

    click="button_clickHandler(event)"/>


                  paddingBottom="10" paddingTop="10" paddingLeft="10" 
paddingRight="10"

              height="100%" width="100%">

                         text="Moving from one form field to another triggers 
the validator."/>


        
            

            
                
            

            

                
            
        

    



Thanks,
Serkan


Re: Cairngorm to Crux

2019-11-01 Thread Takeshita Shoichiro
Greg, thanks.

Warning messages have gone.

I will prepare a migration note to be shared with members.  Before that, I
will ask some questions shortly.

On Fri, Nov 1, 2019 at 9:51 AM Greg Dove  wrote:

> Hi Takeshita,
>
> Great! Yes those warnings are not unexpected. One issue with public vars
> in Royale is that they can be renamed in the minified javascript output,
> and not accessible via dynamic access e.g this['dispatcher'] is not
> reliable inside Login.mxml, for example. Most often this is not an issue,
> but that warning is just to remind people about this.
>
> But Crux uses reflection to set those correctly for [Inject] processing
> even when they are renamed/minified.
>
> You can avoid the warnings by using doc-comment directives.
>
> For an actionscript class, you can annotate individual public vars, or
> (easier) the class itself with the following before :
>  /**
>  *  @royalesuppresspublicvarwarning
>  */
>
> In mxml script blocks I expect this is only possible for each individual
> member.
>
>
> On Fri, Nov 1, 2019 at 1:39 PM Takeshita Shoichiro 
> wrote:
>
>> Greg, the build worked after removing source-path, which I added.
>> Thanks.  I've confirmed the same output as yours was generated.
>>
>> Well, some warning messages are shown as follows.  Would you please check?
>>
>>
>> 
>>
>> > Executing task in folder Porting: C:\Program
>> Files\Java\jdk-11.0.5\bin\java.exe -jar
>> c:\Users\jl031\.vscode\extensions\bowlerhatllc.vscode-nextgenas-0.23.2\bin\asconfigc.jar
>> --sdk c:\apache-royale-0.9.7-bin-js\royale-asjs --debug=true --project
>> c:\Workspace\CairngormToCrux\Porting\asconfig.json <
>>
>>
>>
>> MXMLJSC
>> +royalelib=c:\apache-royale-0.9.7-bin-js\royale-asjs\frameworks
>> --debug=true
>> +configname=royale
>> --targets=JSRoyale
>> --js-library-path+=${royalelib}/js/libs/BasicJS.swc
>> --js-library-path+=${royalelib}/js/libs/MXRoyaleJS.swc
>> --js-library-path+=${royalelib}/js/libs/SparkRoyaleJS.swc
>> --js-library-path+=${royalelib}/js/libs/CoreJS.swc
>> --js-library-path+=${royalelib}/js/libs/LanguageJS.swc
>> --js-library-path+=${royalelib}/js/libs/CruxJS.swc
>> --js-library-path+=${royalelib}/js/libs/HTMLJS.swc
>> --js-library-path+=${royalelib}/js/libs/CollectionsJS.swc
>> --js-library-path+=${royalelib}/js/libs/BindingJS.swc
>> --js-library-path+=${royalelib}/js/libs/GraphicsJS.swc
>> --js-library-path+=${royalelib}/js/libs/ReflectionJS.swc
>> --js-library-path+=${royalelib}/js/libs/TLFJS.swc
>> --js-library-path+=${royalelib}/js/libs/XMLJS.swc
>> --js-library-path+=${royalelib}/js/libs/TextJS.swc
>> --js-library-path+=${royalelib}/js/libs/NetworkJS.swc
>> --source-map=true
>>
>> -keep-as3-metadata+=Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient
>> -keep-code-with-metadata=Inject
>> --
>> src/main/royale/Main.mxml
>> The project 'Main' has been successfully compiled.
>> c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(60): col:
>> 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter
>> instead.
>>
>> public var userName:String;
>> ^
>>
>> c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(61): col:
>> 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter
>> instead.
>>
>> public var userId:String;
>> ^
>>
>> c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(62): col:
>> 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter
>> instead.
>>
>> public var roleName:String;
>> ^
>>
>> c:\Workspace\CairngormToCrux\Porting\src\main\royale\Main.mxml(63): col:
>> 4 隴ヲ蜻・: public var may not work in minified JS output.  Use getter/setter
>> instead.
>>
>> public var headerViewControl:ArrayCollection;
>> ^
>>
>> c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(44):
>> col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use
>> getter/setter instead.
>>
>> public var loginModel:LoginModel;
>> ^
>>
>> c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\view\Login.mxml(47):
>> col: 4 隴ヲ蜻・: public var may not work in minified JS output.  Use
>> getter/setter instead.
>>
>> public var dispatcher:IEventDispatcher;
>> ^
>>
>> c:\Workspace\CairngormToCrux\Porting\src\main\royale\jp\co\tak\command\LoginSignInCommand.as(25):
>> col: 3 隴ヲ蜻・: public var may not work in minified JS output.  Use
>> getter/setter instead.
>>
>> public var loginModel:LoginModel;
>> ^
>>
>>