You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@royale.apache.org by De Carli Gustavo <gu...@gmail.com> on 2020/02/05 15:34:56 UTC
Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the
construction of the ServiceLocator, I understand that it is an error of the
MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
*1. CODE *
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:mx="library://ns.apache.org/royale/mx"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
*2. LINE OF ERROR (RED)*
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at
Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
(MXMLDataInterpreter.js:126)
at
Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
(MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at
Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
(UIBase.js:402)
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
ok, I'll look to reimplement with crux
Thank.
El mié., 5 feb. 2020 a las 15:05, Carlos Rovira (<ca...@apache.org>)
escribió:
> Hi,
>
> Cairngorm depends on Flash APIs, so make a Royale migration could be not
> easy, or requires some expertise.
> You can use Crux instead that has support for Cairngorm style Commands.
> Crux is the same as Swiz Framework for Flex but rewritten to work in
> Royale, and supports much more like dependency injection, Inversion of
> control, event handling, ...
> You have 3 examples in the examples/crux folder you can check.
> I recommend you Crux over Cairngorm since Swiz was born to substitute
> Cairngorm
>
>
> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
> gustavodecarli@gmail.com>) escribió:
>
>> Alex
>>
>> <version>0.9.7-SNAPSHOT</version>
>>
>> Thank
>>
>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>>> What version of the compiler are you using?
>>>
>>>
>>>
>>> What does the ServiceLocator source look like? It might be an issue
>>> with defaultProperties for non-DOM objects.
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>>
>>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>>> the construction of the ServiceLocator, I understand that it is an error of
>>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>
>>> Thank
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> *1. CODE *
>>>
>>>
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>>
>>>
>>>
>>> <cairngorm:ServiceLocator
>>>
>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ca2fdd1df7efe4ae1d09608d7aa50fd99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165137141037472&sdata=QWrbWuETHlUgAy9qfGLk%2Bg2gT0WnqFBG2q5mbyWpJDo%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:mx="library://ns.apache.org/royale/mx
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ca2fdd1df7efe4ae1d09608d7aa50fd99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165137141047426&sdata=iNbi%2BaaHnZ6ClcNYhQRPBBt%2FkOE6rzdLipLxSOQJZOo%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>
>>>
>>>
>>>
>>>
>>> <mx:RemoteObject
>>>
>>> id="srvSeguridades"
>>>
>>>
>>>
>>> destination="seguridades"
>>>
>>>
>>>
>>> result="event.token.resultHandler(event)"
>>>
>>>
>>>
>>> fault="event.token.faultHandler(event)"
>>>
>>>
>>>
>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>
>>>
>>>
>>>
>>>
>>> </cairngorm:ServiceLocator>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *2. LINE OF ERROR (RED)*
>>>
>>> /
>>>
>>>
>>>
>>> **
>>> * @constructor
>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>> */
>>> services.Servicio = function() {
>>> services.Servicio.base(this, 'constructor');
>>>
>>> /**
>>> * @private
>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>> */
>>> this.srvSeguridades_;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldd;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldp;
>>>
>>> this.generateMXMLAttributes
>>> ([1,
>>> mx.rpc.remoting.mxml.RemoteObject,
>>> 3,
>>> 'id',
>>> true,
>>> 'srvSeguridades',
>>> 'destination',
>>> true,
>>> 'seguridades',
>>> 'endpoint',
>>> true,
>>> 'http://localhost:8080/messagebroker/amf',
>>> 0,
>>> 2,
>>> 'result',
>>> this.$EH0,
>>> 'fault',
>>> this.$EH1,
>>> null0, <- ERROR
>>> 0
>>> ]);
>>>
>>> };
>>>
>>>
>>>
>>>
>>>
>>> 3. Trace console log
>>>
>>>
>>>
>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>> at new services.Servicio (Servicio.js:61)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>> (MXMLDataInterpreter.js:126)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>> (MXMLDataInterpreter.js:271)
>>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>> at
>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>> (UIBase.js:402)
>>>
>>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
That will still need some changes. I'd suggest it is best to remove the use
of XML/XMLList in this library because reflection support in Royale is more
like a more advanced reflection library that you can sometimes use in swf,
instead of raw data (XML).
I will look into Cairngorm later today or tomorrow. It seems that it may be
worth providing a direct port.
On Thu, Feb 6, 2020 at 9:00 AM De Carli Gustavo <gu...@gmail.com>
wrote:
>
> I download https://sourceforge.net/adobe/cairngorm/code/, and change.
>
> import flash.utils.describeType;
> --> import org.apache.royale.reflection.describeType;
>
> import flash.utils.Dictionary;
> --> import org.apache.royale.utils.ObjectMap;
>
> And this method
>
> /**
> * Return all the accessors on this object.
> * @param serviceLocator the IServiceLocator instance.
> * @return this object's accessors.
> */
> protected function getAccessors( serviceLocator : IServiceLocator ) :
> XMLList
> {
> /*
> var description : XML = describeType( serviceLocator );
> var accessors : XMLList = description.accessor.( @access == "readwrite"
> ).@name;
> return accessors;
> */
>
> return describeType( serviceLocator).accessors(@access == "readwrite"
> ).@name;
> }
>
>
>
> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
> escribió:
>
>> Carlos, What Flash APIs is Cairngorm dependent on?
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *Carlos Rovira <ca...@apache.org>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>> Hi,
>>
>>
>>
>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>> easy, or requires some expertise.
>>
>> You can use Crux instead that has support for Cairngorm style Commands.
>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>> Royale, and supports much more like dependency injection, Inversion of
>> control, event handling, ...
>>
>> You have 3 examples in the examples/crux folder you can check.
>>
>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>> Cairngorm
>>
>>
>>
>>
>>
>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>> gustavodecarli@gmail.com>) escribió:
>>
>> Alex
>>
>>
>>
>> <version>0.9.7-SNAPSHOT</version>
>>
>>
>>
>> Thank
>>
>>
>>
>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> What version of the compiler are you using?
>>
>>
>>
>> What does the ServiceLocator source look like? It might be an issue with
>> defaultProperties for non-DOM objects.
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>>
>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>> the construction of the ServiceLocator, I understand that it is an error of
>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>
>> Thank
>>
>> Gustavo.
>>
>>
>>
>> *1. CODE *
>>
>>
>>
>>
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>
>>
>>
>> <cairngorm:ServiceLocator
>>
>> xmlns:fx="http://ns.adobe.com/mxml/2009
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068663207&sdata=JLOGFIXWyvXPtTk3P2zPQLI9K3fVUv61%2B%2FHjYMP2KLE%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:mx="library://ns.apache.org/royale/mx
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=TXCVez5kEcJgl2%2FsWRjS8X7HpV%2BnZGITwRJyed2GumI%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>
>>
>>
>>
>>
>> <mx:RemoteObject
>>
>> id="srvSeguridades"
>>
>>
>>
>> destination="seguridades"
>>
>>
>>
>> result="event.token.resultHandler(event)"
>>
>>
>>
>> fault="event.token.faultHandler(event)"
>>
>>
>>
>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>
>>
>>
>>
>>
>> </cairngorm:ServiceLocator>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *2. LINE OF ERROR (RED)*
>>
>> /
>>
>>
>>
>> **
>> * @constructor
>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>> */
>> services.Servicio = function() {
>> services.Servicio.base(this, 'constructor');
>>
>> /**
>> * @private
>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>> */
>> this.srvSeguridades_;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldd;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldp;
>>
>> this.generateMXMLAttributes
>> ([1,
>> mx.rpc.remoting.mxml.RemoteObject,
>> 3,
>> 'id',
>> true,
>> 'srvSeguridades',
>> 'destination',
>> true,
>> 'seguridades',
>> 'endpoint',
>> true,
>> 'http://localhost:8080/messagebroker/amf',
>> 0,
>> 2,
>> 'result',
>> this.$EH0,
>> 'fault',
>> this.$EH1,
>> null0, <- ERROR
>> 0
>> ]);
>>
>> };
>>
>>
>>
>>
>>
>> 3. Trace console log
>>
>>
>>
>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>> at new services.Servicio (Servicio.js:61)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>> (MXMLDataInterpreter.js:126)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>> (MXMLDataInterpreter.js:271)
>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>> at
>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>> (UIBase.js:402)
>>
>>
>>
>>
>> --
>>
>> Carlos Rovira
>>
>> http://about.me/carlosrovira
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=2pi7HsEBr5zw9jCg%2Fu4OQvPQs9Ys5TFWbQeIZf1IG88%3D&reserved=0>
>>
>>
>>
>
Re: Cairngorm problem add remote object MXML.
Posted by Carlos Rovira <ca...@apache.org>.
Hi Alex,
for jewel, for example you can see TodoMVC, when I added MXRoyale to get
SharedObject visuals changed
I need to add to the pom.xml this:
-compiler.exclude-defaults-css-files=MXRoyale-${royale.framework.version}-js.swc:defaults.css
If you remove that line, you can see the issue
Anyway, I think the problem for me is not mix UI sets, since each one
brings its defaults to commons things. For example application-body,
view,...and then containers and controls. So does not have sense to me mix
UI sets. Or said in other way: has more sense to me to provide the missing
control or container to the UI set that does not have it than mix two sets.
The other benefit for the user is while coding: code intelligence will show
just 1 button, 1 list,...and not lots of them that will never use.
Other benefit will be that compiling should have lower requirements and be
more quick since will just involve 1 UI Set library instead of lots of them.
For non-visual code libraries (Router, Network, Reflection, Binding,...)
this does not apply, since you just get the code if you use it. But UI sets
are different since each one brings different versions of the seam need and
brings common CSS to the mix too, what is never wanted (or neither, user or
compiler should have to worry about it, and should be a non-valid scenario
for us).
El lun., 10 feb. 2020 a las 8:16, Greg Dove (<gr...@gmail.com>)
escribió:
>
> "I will try to make the full source of what I have available for Cairngorm
> port in about 24 hours time from this email. I need to check all the
> licence stuff. "
>
> Sorry, I did not get to the above yet as I had hoped, but I will find time
> tomorrow local time. It turns out that I might need to use this myself for
> a client.
>
>
>
> On Sun, Feb 9, 2020 at 7:30 PM Greg Dove <gr...@gmail.com> wrote:
>
>>
>> There is a css clash between Jewel and MXRoyale, and there might be more
>> issues at the child element level with different required base classes etc,
>> but I am not sure because I did not try that. Alex will undoubtedly explain
>> better than me.
>> I am pretty sure you cannot use MXRoyale visual components combined with
>> Jewel in the same project. But you do need the service related classes from
>> MXRoyale for Cairngorm.
>>
>> I am testing Cairngorm using 'Express', but if you want to use Jewel
>> (e.g. always <j:Button or <j:SomethingElse and never <mx:Something), the
>> following should work so that you can still use the service classes from MX
>> (which Cairngorm has hard dependencies for).
>>
>> Below is what I am doing... you need to add the third option of the
>> following in maven:
>> <additionalCompilerOptions>
>> -js-default-initializers=true;
>> -source-map=true;
>>
>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
>> </additionalCompilerOptions>
>>
>> The first 2 above are options I use during development - you may or may
>> not want those.
>>
>> I will try to make the full source of what I have available for Cairngorm
>> port in about 24 hours time from this email. I need to check all the
>> licence stuff. I have a test app working but no view-related Cairngorm
>> stuff yet.
>>
>>
>>
>>
>>
>> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <
>> gustavodecarli@gmail.com> wrote:
>>
>>> Hi .
>>>
>>> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was
>>> correct, the error does not reproduce anymore (null0).
>>> *Greg*. I tried the library and it worked correctly, I would like to
>>> know the implementation of the ServiceLocator.as how it is done, I made my
>>> own and although it worked, I have problems when I add a jewel tag in the
>>> project, for example a <j: Button>
>>>
>>> Is it possible or correct to have tag mx and jewel in the same project?
>>>
>>> *thanks to you .*
>>>
>>>
>>> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>>> Make sure your app is using the updated compiler. I assume you are
>>>> using Maven to compile the app? Check the pom.xml to make sure it is
>>>> referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version.
>>>> One trick is to add some System.out.println to the file that was changed
>>>> and see if it shows up in the output.
>>>>
>>>>
>>>>
>>>> Regarding the tests, in the pom.xml for some of the projects like
>>>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>>>> which tests/files are run.
>>>>
>>>>
>>>>
>>>> HTH,
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Friday, February 7, 2020 at 3:15 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>> Hi, yesterday I tried with the change of Alex, from the royale-compiler
>>>> without success, the "null0" continues. I don't know if I missed a step.
>>>>
>>>> I rebuilt with the royale-compiler project "mvn clean install" and
>>>> tried again the compilation of my project.
>>>>
>>>> On the other hand I am seeing to create a Test in the project, but I
>>>> see that they are not running the tests of the package "royale-compiler \
>>>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>>>> internal \ codegen \ mxml \ ...", do you know why?
>>>>
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> Gustavo.
>>>>
>>>>
>>>>
>>>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>>>> escribió:
>>>>
>>>>
>>>> I'll try to get an minimal example working over my weekend sometime to
>>>> test what I have. I made a quick start on that, just to get something that
>>>> compiles. Once I see that it seems to be working I will release to git repo
>>>> for the port.
>>>>
>>>> If you do want to try a different swc from what you already have, you
>>>> could try one now from builds here I think:
>>>>
>>>>
>>>>
>>>>
>>>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>>>
>>>>
>>>>
>>>> (I will remove that link in some days once the port is more thoroughly
>>>> tested and available to all)
>>>>
>>>>
>>>>
>>>> I was able to inspect and verify that the js build had a
>>>> ServicesLocator (as defined in that swc) mxml subclass which was populating
>>>> correctly with the recent compiler changes from Alex, but I am not yet able
>>>> to test more thoroughly. The view support probably won't work yet because
>>>> there are no 'added' and 'removed' events, but we will figure something out.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>>>>
>>>>
>>>> Alex, I tested this change today. There is more to it than that, it
>>>> seems. I will discuss details in dev list.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>>>
>>>> royale-compiler
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>> Sorry Alex, what repository is that of the push ?
>>>>
>>>>
>>>>
>>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> I just pushed a change to the compiler. It should now have valid
>>>> output for ServiceLocator.
>>>>
>>>>
>>>>
>>>> The compiler change was interesting in that I changed an else clause
>>>> that was put in to handle instances specified as children of top tags but
>>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>>> that code so none of our tests actually used that code, even though the
>>>> commit log implied it was for one of the tests. Either I made the earlier
>>>> change to propagate the fix for plain properties to instances or there is
>>>> some other scenario for instances as children (without a default property)
>>>> that I am not thinking of.
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we save
>>>> a lot of time in migrations where they use it and leave more time for other
>>>> questions.
>>>>
>>>> i will continue to test how to fill that array today.
>>>>
>>>> Thank you very much for everyone in this collaboration.
>>>>
>>>>
>>>>
>>>> Gustavo.
>>>>
>>>>
>>>>
>>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<
>>>> carlosrovira@apache.org>) escribió:
>>>>
>>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the
>>>> words :)
>>>>
>>>>
>>>>
>>>> I know Cairngorm could be good for people wanting to migrate with the
>>>> less effort possible. Anyway, I recommend, if possible to try to switch to
>>>> Crux. We already did that several years ago in Flex, since all DI, IOC
>>>> stuff, make us be more efficient and increase options. For people creating
>>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>>> the Crux option if they continue evolving the app with new features...
>>>>
>>>>
>>>>
>>>> just my 2 :)
>>>>
>>>>
>>>>
>>>> Carlos
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<
>>>> jl03119@gmail.com>) escribió:
>>>>
>>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>>> Carlos, thanks all the times.^_^
>>>>
>>>>
>>>>
>>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>>
>>>>
>>>>
>>>> Hi Takeshita,
>>>>
>>>>
>>>>
>>>> Yes I think a few people have asked for Cairngorm or expressed interest
>>>> in it. Given the choice, I personally think Crux will be a more
>>>> modern/better option, but like I said, more people are asking for Cairngorm
>>>> now, so probably it makes sense to port that too.
>>>>
>>>>
>>>>
>>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>>> well for you. Please report any issues if you see them.
>>>>
>>>>
>>>>
>>>> One small thing: I definitely understand that you were referring to the
>>>> work I did on porting it to Royale, but just for the sake of anyone else
>>>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>>>> from Swiz, and credit for the awesome features it has rests with the
>>>> original authors of Swiz (I was in contact with the original developer
>>>> during my efforts to port it to Royale).
>>>>
>>>> Also, just so people are aware, Carlos sponsored the majority of my
>>>> work on porting that, so you really have Carlos to thank for that.
>>>>
>>>>
>>>>
>>>> cheers,
>>>>
>>>> Greg
>>>>
>>>>
>>>>
>>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>>> wrote:
>>>>
>>>> Greg,
>>>>
>>>>
>>>>
>>>> Thanks for your work. We already have your Crux framework replacing
>>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>>> plenty of time of emulation work.
>>>>
>>>>
>>>>
>>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>>
>>>>
>>>> There does not appear to be a default property, like an array to put
>>>> the 'children' in. I think it just creates the children as instances and
>>>> makes sure they have id properties on the mxml-generated subclass that the
>>>> instances are assigned to.
>>>>
>>>>
>>>>
>>>> The services are then identified and categorised by iterating the
>>>> accessors of the ServiceLocator subclass via reflection and checking their
>>>> types and then registering them.
>>>>
>>>> Although it is and mxml instance of ServiceLocator, it is also an
>>>> enforced singleton which is accessed elsewhere from code. At least that is
>>>> how it appears to be set up to me.
>>>>
>>>>
>>>>
>>>> I already took a look at the code and have made (not many) local
>>>> changes and have the Cairngorm swc compiling via maven for both js and swf.
>>>> I have not tested it. Things like weak event listeners are gone.
>>>>
>>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>>> ViewHelper automated register/unregister. Maybe we can have a
>>>> CaingormViewBase class with support for these, or perhaps we can use the
>>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>>> be all that is needed, but it may not always work the same.
>>>>
>>>>
>>>>
>>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>>>> permissive (
>>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>>>> It seems to be to be similar to others like MIT etc, but I don't know
>>>> specifically what the rules are for Apache with that licence (in terms of
>>>> possibility to include in Royale itself).
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>>> gustavodecarli@gmail.com> wrote:
>>>>
>>>> Alex :
>>>>
>>>>
>>>> In flex use the swc. I am seeing the same thing that you are
>>>> commenting, I do not understand where it assigns the remote objects to the
>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>> the RemoteObjects class. I will try to assign by code without using the
>>>> mxml to see if it does not generate the error "null0".
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>>> but the cause is that ServiceLocator does not have a default property. Did
>>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>>> mx:RemoteObject?
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>>>> and change.
>>>>
>>>>
>>>>
>>>> import flash.utils.describeType;
>>>>
>>>> --> import org.apache.royale.reflection.describeType;
>>>>
>>>> import flash.utils.Dictionary;
>>>>
>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>
>>>>
>>>>
>>>> And this method
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>>
>>>>
>>>> * Return all the accessors on this object.
>>>>
>>>>
>>>>
>>>> * @param serviceLocator the IServiceLocator instance.
>>>>
>>>>
>>>>
>>>> * @return this object's accessors.
>>>>
>>>>
>>>>
>>>> */
>>>>
>>>>
>>>>
>>>> protected
>>>>
>>>> function getAccessors(
>>>>
>>>> serviceLocator : IServiceLocator ) :
>>>>
>>>> XMLList
>>>>
>>>>
>>>>
>>>> {
>>>>
>>>>
>>>>
>>>> /*
>>>>
>>>>
>>>>
>>>> var description : XML = describeType( serviceLocator );
>>>>
>>>>
>>>>
>>>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>>>> ).@name;
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> return accessors;
>>>>
>>>>
>>>>
>>>> */
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> return describeType( serviceLocator).accessors(@access ==
>>>>
>>>> "readwrite" ).@name;
>>>>
>>>>
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>> not easy, or requires some expertise.
>>>>
>>>> You can use Crux instead that has support for Cairngorm style Commands.
>>>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>>>> Royale, and supports much more like dependency injection, Inversion of
>>>> control, event handling, ...
>>>>
>>>> You have 3 examples in the examples/crux folder you can check.
>>>>
>>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>>> Cairngorm
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>> gustavodecarli@gmail.com>) escribió:
>>>>
>>>> Alex
>>>>
>>>>
>>>>
>>>> <version>0.9.7-SNAPSHOT</version>
>>>>
>>>>
>>>>
>>>> Thank
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> What version of the compiler are you using?
>>>>
>>>>
>>>>
>>>> What does the ServiceLocator source look like? It might be an issue
>>>> with defaultProperties for non-DOM objects.
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>>>> the construction of the ServiceLocator, I understand that it is an error of
>>>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>
>>>> Thank
>>>>
>>>> Gustavo.
>>>>
>>>>
>>>>
>>>> *1. CODE *
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>
>>>>
>>>>
>>>> <cairngorm:ServiceLocator
>>>>
>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>>>> "
>>>>
>>>>
>>>>
>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>>>> "
>>>>
>>>>
>>>>
>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <mx:RemoteObject
>>>>
>>>> id="srvSeguridades"
>>>>
>>>>
>>>>
>>>> destination="seguridades"
>>>>
>>>>
>>>>
>>>> result="event.token.resultHandler(event)"
>>>>
>>>>
>>>>
>>>> fault="event.token.faultHandler(event)"
>>>>
>>>>
>>>>
>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> </cairngorm:ServiceLocator>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *2. LINE OF ERROR (RED)*
>>>>
>>>> /
>>>>
>>>>
>>>>
>>>> **
>>>> * @constructor
>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>> */
>>>> services.Servicio = function() {
>>>> services.Servicio.base(this, 'constructor');
>>>>
>>>> /**
>>>> * @private
>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>> */
>>>> this.srvSeguridades_;
>>>>
>>>> /**
>>>> * @private
>>>> * @type {Array}
>>>> */
>>>> this.mxmldd;
>>>>
>>>> /**
>>>> * @private
>>>> * @type {Array}
>>>> */
>>>> this.mxmldp;
>>>>
>>>> this.generateMXMLAttributes
>>>> ([1,
>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>> 3,
>>>> 'id',
>>>> true,
>>>> 'srvSeguridades',
>>>> 'destination',
>>>> true,
>>>> 'seguridades',
>>>> 'endpoint',
>>>> true,
>>>> 'http://localhost:8080/messagebroker/amf',
>>>> 0,
>>>> 2,
>>>> 'result',
>>>> this.$EH0,
>>>> 'fault',
>>>> this.$EH1,
>>>> null0, <- ERROR
>>>> 0
>>>> ]);
>>>>
>>>> };
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 3. Trace console log
>>>>
>>>>
>>>>
>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>> at new services.Servicio (Servicio.js:61)
>>>> at
>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>> (MXMLDataInterpreter.js:126)
>>>> at
>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>> (MXMLDataInterpreter.js:271)
>>>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>> at
>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>> (UIBase.js:402)
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Carlos Rovira
>>>>
>>>> http://about.me/carlosrovira
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Shoichiro Takeshita
>>>> 武下 祥一郎
>>>>
>>>> --
>>>>
>>>> Shoichiro Takeshita
>>>> 武下 祥一郎
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Carlos Rovira
>>>>
>>>> http://about.me/carlosrovira
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>>>
>>>>
>>>>
>>>>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Thanks Greg, your answers were well understood, excuse me for my English.
Good week.
El mar., 18 feb. 2020 a las 3:51, Greg Dove (<gr...@gmail.com>)
escribió:
>
> Hi Gustavo,
>
> Sorry, I cannot check this for a few days at least. My week is challenging
> for unexpected personal reasons.
>
> 1. generally if maven doesn't work but vscode does, it is because maven
> does not have all the required dependencies specified. Vscode (I think, can
> others please correct me if I am wrong) includes all libraries by default.
>
> 2. "getter y setter from private attributes, require explicit bindable"
> I have made a few changes recently that get getters and setters working
> more in [Bindable] classes without specifying [Bindable] again.
> You should even see warnings now about duplicate redundant [Bindable] same
> as Flex.
>
> iirc I think you can have [Bindable] private vars inside mxml code blocks,
> but I don't think that makes sense in regular actionscript class. At least
> I would assume not. I will try to check it in a couple of days.
>
> I hope I understood your question correctly
> Greg
>
> On Tue, Feb 18, 2020 at 1:23 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
>> Greg, Hi ,
>> Create a client server project model with cairngorm and the library you
>> provide. Although the project works, some points that I could not solve may
>> be able to guide me.
>>
>> https://github.com/gustavodecarli/apache-royale-cairngorm
>>
>> Click in the green Button, the result
>>
>>
>> [image: image.png]
>> .
>>
>> *1, Compiling with the royale maven pluging and adding the cairngorm
>> library gives this error, you see the compilation line it generates. The
>> strange thing is that since VSCODE does not give compilation error *
>>
>> ./Cairngorm/mvn royale:compile-app
>>
>> [*INFO*] *--- *royale-maven-plugin:0.9.7-SNAPSHOT:compile-app
>> *(default-cli)* @ Cairngorm* ---*
>>
>> [*INFO*] Executing MXMLC in tool group Royale with args:
>> [-load-config=/Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/target/compile-app-config.xml,
>> -js-default-initializers=true,
>> -keep-as3-metadata+=DefaultProperty,Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
>> -keep-code-with-metadata=Inject, -js-dynamic-access-unknown-members,
>> -source-map=true,
>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css:,cairngorm-js.swc,
>> +configname=flex, -js-library-path=libs/cairngorm-js.swc,
>> -js-output=/Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/target/javascript,
>> -compiler.targets=JSRoyale,
>> /Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/src/main/royale/App.mxml]
>>
>> /Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/src/main/royale/App.mxml(2):
>> col: 1 Error: This tag could not be resolved to an ActionScript class. It
>> will be ignored.
>>
>>
>> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>>
>>
>>
>> 2. Other question, getter y setter from private attributes, require
>> explicit bindable ?
>>
>>
>> package entidadesbasicas.modelo.entidades
>> {
>>
>> [Bindable]
>> public class MonedaBase {
>> private var _codigo:String;
>> private var _descripcion:String;
>>
>> [Bindable]
>> public function get codigo():String{
>> return this._codigo;
>> }
>> [Bindable]
>> public function get descripcion():String{
>> return this._descripcion;
>> }
>> [Bindable]
>> public function set codigo(value:String):void{
>> this._codigo = value;
>> }
>> [Bindable]
>> public function set descripcion(value:String):void{
>> this._descripcion = value;
>> }
>> }
>>
>>
>>
>> 3. The columns width do not order no is correct.
>>
>>
>> 4. I had to force the assignment of the dataprovider on the grid
>>
>>
>> in ./Cairngorm App.mxml
>>
>>
>> <mx:DataGrid id="grdData" dataProvider="{modelo.dataProvider}">
>> <mx:columns>
>> <mx:DataGridColumn dataField="codigo"/>
>> <mx:DataGridColumn dataField="descripcion"/>
>> </mx:columns>
>> </mx:DataGrid>
>>
>>
>>
>>
>> private function onResult(e:Event):void{
>> Alert.show(this.modelo.dataProvider.length + " rows ", "Result Finish")
>> ;
>>
>> //This is requerid ?
>> this.grdData.dataProvider = this.modelo.dataProvider;
>>
>> console.log(this.modelo.dataProvider);
>> }
>>
>>
>> I'm going to try the same example in Jewel
>>
>>
>>
>> greetings to all
>>
>> El mar., 11 feb. 2020 a las 4:54, Greg Dove (<gr...@gmail.com>)
>> escribió:
>>
>>> Hi Gustavo,
>>>
>>> I did not (again) get to spend time on this as I had hoped to.
>>> But just in case it is useful to you, I have put the current source code
>>> in the same dropbox fileset. All the original Adobe licence headers should
>>> still be present unless I missed something, I will check this more
>>> thoroughly and I will probably push to a git repo this coming weekend along
>>> with a working example, after I solved the issue with the ADDED and REMOVED
>>> events in the view helper support.
>>>
>>>
>>>
>>> On Mon, Feb 10, 2020 at 8:16 PM Greg Dove <gr...@gmail.com> wrote:
>>>
>>>>
>>>> "I will try to make the full source of what I have available for
>>>> Cairngorm port in about 24 hours time from this email. I need to check all
>>>> the licence stuff. "
>>>>
>>>> Sorry, I did not get to the above yet as I had hoped, but I will find
>>>> time tomorrow local time. It turns out that I might need to use this myself
>>>> for a client.
>>>>
>>>>
>>>>
>>>> On Sun, Feb 9, 2020 at 7:30 PM Greg Dove <gr...@gmail.com> wrote:
>>>>
>>>>>
>>>>> There is a css clash between Jewel and MXRoyale, and there might be
>>>>> more issues at the child element level with different required base classes
>>>>> etc, but I am not sure because I did not try that. Alex will undoubtedly
>>>>> explain better than me.
>>>>> I am pretty sure you cannot use MXRoyale visual components combined
>>>>> with Jewel in the same project. But you do need the service related classes
>>>>> from MXRoyale for Cairngorm.
>>>>>
>>>>> I am testing Cairngorm using 'Express', but if you want to use Jewel
>>>>> (e.g. always <j:Button or <j:SomethingElse and never <mx:Something), the
>>>>> following should work so that you can still use the service classes from MX
>>>>> (which Cairngorm has hard dependencies for).
>>>>>
>>>>> Below is what I am doing... you need to add the third option of the
>>>>> following in maven:
>>>>> <additionalCompilerOptions>
>>>>> -js-default-initializers=true;
>>>>> -source-map=true;
>>>>>
>>>>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
>>>>> </additionalCompilerOptions>
>>>>>
>>>>> The first 2 above are options I use during development - you may or
>>>>> may not want those.
>>>>>
>>>>> I will try to make the full source of what I have available for
>>>>> Cairngorm port in about 24 hours time from this email. I need to check all
>>>>> the licence stuff. I have a test app working but no view-related Cairngorm
>>>>> stuff yet.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <
>>>>> gustavodecarli@gmail.com> wrote:
>>>>>
>>>>>> Hi .
>>>>>>
>>>>>> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was
>>>>>> correct, the error does not reproduce anymore (null0).
>>>>>> *Greg*. I tried the library and it worked correctly, I would like to
>>>>>> know the implementation of the ServiceLocator.as how it is done, I made my
>>>>>> own and although it worked, I have problems when I add a jewel tag in the
>>>>>> project, for example a <j: Button>
>>>>>>
>>>>>> Is it possible or correct to have tag mx and jewel in the same
>>>>>> project?
>>>>>>
>>>>>> *thanks to you .*
>>>>>>
>>>>>>
>>>>>> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
>>>>>> escribió:
>>>>>>
>>>>>>> Make sure your app is using the updated compiler. I assume you are
>>>>>>> using Maven to compile the app? Check the pom.xml to make sure it is
>>>>>>> referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version.
>>>>>>> One trick is to add some System.out.println to the file that was changed
>>>>>>> and see if it shows up in the output.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Regarding the tests, in the pom.xml for some of the projects like
>>>>>>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>>>>>>> which tests/files are run.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> HTH,
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Friday, February 7, 2020 at 3:15 AM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi, yesterday I tried with the change of Alex, from the
>>>>>>> royale-compiler without success, the "null0" continues. I don't know if I
>>>>>>> missed a step.
>>>>>>>
>>>>>>> I rebuilt with the royale-compiler project "mvn clean install" and
>>>>>>> tried again the compilation of my project.
>>>>>>>
>>>>>>> On the other hand I am seeing to create a Test in the project, but I
>>>>>>> see that they are not running the tests of the package "royale-compiler \
>>>>>>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>>>>>>> internal \ codegen \ mxml \ ...", do you know why?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks.
>>>>>>>
>>>>>>> Gustavo.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>>>>>>> escribió:
>>>>>>>
>>>>>>>
>>>>>>> I'll try to get an minimal example working over my weekend sometime
>>>>>>> to test what I have. I made a quick start on that, just to get something
>>>>>>> that compiles. Once I see that it seems to be working I will release to git
>>>>>>> repo for the port.
>>>>>>>
>>>>>>> If you do want to try a different swc from what you already have,
>>>>>>> you could try one now from builds here I think:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> (I will remove that link in some days once the port is more
>>>>>>> thoroughly tested and available to all)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I was able to inspect and verify that the js build had a
>>>>>>> ServicesLocator (as defined in that swc) mxml subclass which was populating
>>>>>>> correctly with the recent compiler changes from Alex, but I am not yet able
>>>>>>> to test more thoroughly. The view support probably won't work yet because
>>>>>>> there are no 'added' and 'removed' events, but we will figure something out.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com>
>>>>>>> wrote:
>>>>>>>
>>>>>>>
>>>>>>> Alex, I tested this change today. There is more to it than that, it
>>>>>>> seems. I will discuss details in dev list.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>>>>>>
>>>>>>> royale-compiler
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Sorry Alex, what repository is that of the push ?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>>>>>> escribió:
>>>>>>>
>>>>>>> I just pushed a change to the compiler. It should now have valid
>>>>>>> output for ServiceLocator.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> The compiler change was interesting in that I changed an else clause
>>>>>>> that was put in to handle instances specified as children of top tags but
>>>>>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>>>>>> that code so none of our tests actually used that code, even though the
>>>>>>> commit log implied it was for one of the tests. Either I made the earlier
>>>>>>> change to propagate the fix for plain properties to instances or there is
>>>>>>> some other scenario for instances as children (without a default property)
>>>>>>> that I am not thinking of.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we
>>>>>>> save a lot of time in migrations where they use it and leave more time for
>>>>>>> other questions.
>>>>>>>
>>>>>>> i will continue to test how to fill that array today.
>>>>>>>
>>>>>>> Thank you very much for everyone in this collaboration.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Gustavo.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<
>>>>>>> carlosrovira@apache.org>) escribió:
>>>>>>>
>>>>>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the
>>>>>>> words :)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I know Cairngorm could be good for people wanting to migrate with
>>>>>>> the less effort possible. Anyway, I recommend, if possible to try to switch
>>>>>>> to Crux. We already did that several years ago in Flex, since all DI, IOC
>>>>>>> stuff, make us be more efficient and increase options. For people creating
>>>>>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>>>>>> the Crux option if they continue evolving the app with new features...
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> just my 2 :)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Carlos
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<
>>>>>>> jl03119@gmail.com>) escribió:
>>>>>>>
>>>>>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>>>>>> Carlos, thanks all the times.^_^
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi Takeshita,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Yes I think a few people have asked for Cairngorm or expressed
>>>>>>> interest in it. Given the choice, I personally think Crux will be a more
>>>>>>> modern/better option, but like I said, more people are asking for Cairngorm
>>>>>>> now, so probably it makes sense to port that too.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I'm also pleased to hear that you are using Crux, I hope it's
>>>>>>> working well for you. Please report any issues if you see them.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> One small thing: I definitely understand that you were referring to
>>>>>>> the work I did on porting it to Royale, but just for the sake of anyone
>>>>>>> else who reads this: it's definitely not 'my Crux framework'. The code is
>>>>>>> ported from Swiz, and credit for the awesome features it has rests with the
>>>>>>> original authors of Swiz (I was in contact with the original developer
>>>>>>> during my efforts to port it to Royale).
>>>>>>>
>>>>>>> Also, just so people are aware, Carlos sponsored the majority of my
>>>>>>> work on porting that, so you really have Carlos to thank for that.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> cheers,
>>>>>>>
>>>>>>> Greg
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <
>>>>>>> jl03119@gmail.com> wrote:
>>>>>>>
>>>>>>> Greg,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thanks for your work. We already have your Crux framework replacing
>>>>>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>>>>>> plenty of time of emulation work.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>>>>>
>>>>>>>
>>>>>>> There does not appear to be a default property, like an array to put
>>>>>>> the 'children' in. I think it just creates the children as instances and
>>>>>>> makes sure they have id properties on the mxml-generated subclass that the
>>>>>>> instances are assigned to.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> The services are then identified and categorised by iterating the
>>>>>>> accessors of the ServiceLocator subclass via reflection and checking their
>>>>>>> types and then registering them.
>>>>>>>
>>>>>>> Although it is and mxml instance of ServiceLocator, it is also an
>>>>>>> enforced singleton which is accessed elsewhere from code. At least that is
>>>>>>> how it appears to be set up to me.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I already took a look at the code and have made (not many) local
>>>>>>> changes and have the Cairngorm swc compiling via maven for both js and swf.
>>>>>>> I have not tested it. Things like weak event listeners are gone.
>>>>>>>
>>>>>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>>>>>> ViewHelper automated register/unregister. Maybe we can have a
>>>>>>> CaingormViewBase class with support for these, or perhaps we can use the
>>>>>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>>>>>> be all that is needed, but it may not always work the same.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and
>>>>>>> is permissive (
>>>>>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>>>>>>> It seems to be to be similar to others like MIT etc, but I don't know
>>>>>>> specifically what the rules are for Apache with that licence (in terms of
>>>>>>> possibility to include in Royale itself).
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>>>>>> gustavodecarli@gmail.com> wrote:
>>>>>>>
>>>>>>> Alex :
>>>>>>>
>>>>>>>
>>>>>>> In flex use the swc. I am seeing the same thing that you are
>>>>>>> commenting, I do not understand where it assigns the remote objects to the
>>>>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>>>>> the RemoteObjects class. I will try to assign by code without using the
>>>>>>> mxml to see if it does not generate the error "null0".
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>>>>> escribió:
>>>>>>>
>>>>>>> I grabbed ServiceLocator.as and was able to produce the null0
>>>>>>> problem, but the cause is that ServiceLocator does not have a default
>>>>>>> property. Did your MXML work in Flex? What ServiceLocator property would
>>>>>>> be assigned the mx:RemoteObject?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>>>>>>> and change.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> import flash.utils.describeType;
>>>>>>>
>>>>>>> --> import org.apache.royale.reflection.describeType;
>>>>>>>
>>>>>>> import flash.utils.Dictionary;
>>>>>>>
>>>>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> And this method
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> /**
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> * Return all the accessors on this object.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> * @param serviceLocator the IServiceLocator instance.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> * @return this object's accessors.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> */
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> protected
>>>>>>>
>>>>>>> function getAccessors(
>>>>>>>
>>>>>>> serviceLocator : IServiceLocator ) :
>>>>>>>
>>>>>>> XMLList
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> {
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> /*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> var description : XML = describeType( serviceLocator );
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> var accessors : XMLList = description.accessor.( @access ==
>>>>>>> "readwrite" ).@name;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> return accessors;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> */
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> return describeType( serviceLocator).accessors(@access ==
>>>>>>>
>>>>>>> "readwrite" ).@name;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>>>>> escribió:
>>>>>>>
>>>>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>>>>> not easy, or requires some expertise.
>>>>>>>
>>>>>>> You can use Crux instead that has support for Cairngorm style
>>>>>>> Commands. Crux is the same as Swiz Framework for Flex but rewritten to work
>>>>>>> in Royale, and supports much more like dependency injection, Inversion of
>>>>>>> control, event handling, ...
>>>>>>>
>>>>>>> You have 3 examples in the examples/crux folder you can check.
>>>>>>>
>>>>>>> I recommend you Crux over Cairngorm since Swiz was born to
>>>>>>> substitute Cairngorm
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>>>>> gustavodecarli@gmail.com>) escribió:
>>>>>>>
>>>>>>> Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <version>0.9.7-SNAPSHOT</version>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thank
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>>>>> escribió:
>>>>>>>
>>>>>>> What version of the compiler are you using?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> What does the ServiceLocator source look like? It might be an issue
>>>>>>> with defaultProperties for non-DOM objects.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I am trying to transcribe gairngorm, at runtime it gives me an error
>>>>>>> in the construction of the ServiceLocator, I understand that it is an error
>>>>>>> of the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>>>>
>>>>>>> Thank
>>>>>>>
>>>>>>> Gustavo.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *1. CODE *
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <cairngorm:ServiceLocator
>>>>>>>
>>>>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>>>>>>> "
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>>>>>>> "
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <mx:RemoteObject
>>>>>>>
>>>>>>> id="srvSeguridades"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> destination="seguridades"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> result="event.token.resultHandler(event)"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> fault="event.token.faultHandler(event)"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> </cairngorm:ServiceLocator>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *2. LINE OF ERROR (RED)*
>>>>>>>
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> **
>>>>>>> * @constructor
>>>>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>>>>> */
>>>>>>> services.Servicio = function() {
>>>>>>> services.Servicio.base(this, 'constructor');
>>>>>>>
>>>>>>> /**
>>>>>>> * @private
>>>>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>>>>> */
>>>>>>> this.srvSeguridades_;
>>>>>>>
>>>>>>> /**
>>>>>>> * @private
>>>>>>> * @type {Array}
>>>>>>> */
>>>>>>> this.mxmldd;
>>>>>>>
>>>>>>> /**
>>>>>>> * @private
>>>>>>> * @type {Array}
>>>>>>> */
>>>>>>> this.mxmldp;
>>>>>>>
>>>>>>> this.generateMXMLAttributes
>>>>>>> ([1,
>>>>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>>>>> 3,
>>>>>>> 'id',
>>>>>>> true,
>>>>>>> 'srvSeguridades',
>>>>>>> 'destination',
>>>>>>> true,
>>>>>>> 'seguridades',
>>>>>>> 'endpoint',
>>>>>>> true,
>>>>>>> 'http://localhost:8080/messagebroker/amf',
>>>>>>> 0,
>>>>>>> 2,
>>>>>>> 'result',
>>>>>>> this.$EH0,
>>>>>>> 'fault',
>>>>>>> this.$EH1,
>>>>>>> null0, <- ERROR
>>>>>>> 0
>>>>>>> ]);
>>>>>>>
>>>>>>> };
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 3. Trace console log
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>>>>> at new services.Servicio (Servicio.js:61)
>>>>>>> at
>>>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>>>>> (MXMLDataInterpreter.js:126)
>>>>>>> at
>>>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>>>>> (MXMLDataInterpreter.js:271)
>>>>>>> at main.Main.mx.core.UIComponent.createChildren
>>>>>>> (UIComponent.js:923)
>>>>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>>>>> at main.Main.mx.core.Application.createChildren
>>>>>>> (Application.js:122)
>>>>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>>>>> at main.Main.mx.core.UIComponent.addedToParent
>>>>>>> (UIComponent.js:417)
>>>>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>>>>> at
>>>>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>>>>> (UIBase.js:402)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Carlos Rovira
>>>>>>>
>>>>>>> http://about.me/carlosrovira
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Shoichiro Takeshita
>>>>>>> 武下 祥一郎
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Shoichiro Takeshita
>>>>>>> 武下 祥一郎
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Carlos Rovira
>>>>>>>
>>>>>>> http://about.me/carlosrovira
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
Hi Gustavo,
Sorry, I cannot check this for a few days at least. My week is challenging
for unexpected personal reasons.
1. generally if maven doesn't work but vscode does, it is because maven
does not have all the required dependencies specified. Vscode (I think, can
others please correct me if I am wrong) includes all libraries by default.
2. "getter y setter from private attributes, require explicit bindable"
I have made a few changes recently that get getters and setters working
more in [Bindable] classes without specifying [Bindable] again.
You should even see warnings now about duplicate redundant [Bindable] same
as Flex.
iirc I think you can have [Bindable] private vars inside mxml code blocks,
but I don't think that makes sense in regular actionscript class. At least
I would assume not. I will try to check it in a couple of days.
I hope I understood your question correctly
Greg
On Tue, Feb 18, 2020 at 1:23 PM De Carli Gustavo <gu...@gmail.com>
wrote:
> Greg, Hi ,
> Create a client server project model with cairngorm and the library you
> provide. Although the project works, some points that I could not solve may
> be able to guide me.
>
> https://github.com/gustavodecarli/apache-royale-cairngorm
>
> Click in the green Button, the result
>
>
> [image: image.png]
> .
>
> *1, Compiling with the royale maven pluging and adding the cairngorm
> library gives this error, you see the compilation line it generates. The
> strange thing is that since VSCODE does not give compilation error *
>
> ./Cairngorm/mvn royale:compile-app
>
> [*INFO*] *--- *royale-maven-plugin:0.9.7-SNAPSHOT:compile-app
> *(default-cli)* @ Cairngorm* ---*
>
> [*INFO*] Executing MXMLC in tool group Royale with args:
> [-load-config=/Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/target/compile-app-config.xml,
> -js-default-initializers=true,
> -keep-as3-metadata+=DefaultProperty,Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
> -keep-code-with-metadata=Inject, -js-dynamic-access-unknown-members,
> -source-map=true,
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css:,cairngorm-js.swc,
> +configname=flex, -js-library-path=libs/cairngorm-js.swc,
> -js-output=/Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/target/javascript,
> -compiler.targets=JSRoyale,
> /Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/src/main/royale/App.mxml]
>
> /Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/src/main/royale/App.mxml(2):
> col: 1 Error: This tag could not be resolved to an ActionScript class. It
> will be ignored.
>
>
> <mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
>
>
>
> 2. Other question, getter y setter from private attributes, require
> explicit bindable ?
>
>
> package entidadesbasicas.modelo.entidades
> {
>
> [Bindable]
> public class MonedaBase {
> private var _codigo:String;
> private var _descripcion:String;
>
> [Bindable]
> public function get codigo():String{
> return this._codigo;
> }
> [Bindable]
> public function get descripcion():String{
> return this._descripcion;
> }
> [Bindable]
> public function set codigo(value:String):void{
> this._codigo = value;
> }
> [Bindable]
> public function set descripcion(value:String):void{
> this._descripcion = value;
> }
> }
>
>
>
> 3. The columns width do not order no is correct.
>
>
> 4. I had to force the assignment of the dataprovider on the grid
>
>
> in ./Cairngorm App.mxml
>
>
> <mx:DataGrid id="grdData" dataProvider="{modelo.dataProvider}">
> <mx:columns>
> <mx:DataGridColumn dataField="codigo"/>
> <mx:DataGridColumn dataField="descripcion"/>
> </mx:columns>
> </mx:DataGrid>
>
>
>
>
> private function onResult(e:Event):void{
> Alert.show(this.modelo.dataProvider.length + " rows ", "Result Finish") ;
>
> //This is requerid ?
> this.grdData.dataProvider = this.modelo.dataProvider;
>
> console.log(this.modelo.dataProvider);
> }
>
>
> I'm going to try the same example in Jewel
>
>
>
> greetings to all
>
> El mar., 11 feb. 2020 a las 4:54, Greg Dove (<gr...@gmail.com>)
> escribió:
>
>> Hi Gustavo,
>>
>> I did not (again) get to spend time on this as I had hoped to.
>> But just in case it is useful to you, I have put the current source code
>> in the same dropbox fileset. All the original Adobe licence headers should
>> still be present unless I missed something, I will check this more
>> thoroughly and I will probably push to a git repo this coming weekend along
>> with a working example, after I solved the issue with the ADDED and REMOVED
>> events in the view helper support.
>>
>>
>>
>> On Mon, Feb 10, 2020 at 8:16 PM Greg Dove <gr...@gmail.com> wrote:
>>
>>>
>>> "I will try to make the full source of what I have available for
>>> Cairngorm port in about 24 hours time from this email. I need to check all
>>> the licence stuff. "
>>>
>>> Sorry, I did not get to the above yet as I had hoped, but I will find
>>> time tomorrow local time. It turns out that I might need to use this myself
>>> for a client.
>>>
>>>
>>>
>>> On Sun, Feb 9, 2020 at 7:30 PM Greg Dove <gr...@gmail.com> wrote:
>>>
>>>>
>>>> There is a css clash between Jewel and MXRoyale, and there might be
>>>> more issues at the child element level with different required base classes
>>>> etc, but I am not sure because I did not try that. Alex will undoubtedly
>>>> explain better than me.
>>>> I am pretty sure you cannot use MXRoyale visual components combined
>>>> with Jewel in the same project. But you do need the service related classes
>>>> from MXRoyale for Cairngorm.
>>>>
>>>> I am testing Cairngorm using 'Express', but if you want to use Jewel
>>>> (e.g. always <j:Button or <j:SomethingElse and never <mx:Something), the
>>>> following should work so that you can still use the service classes from MX
>>>> (which Cairngorm has hard dependencies for).
>>>>
>>>> Below is what I am doing... you need to add the third option of the
>>>> following in maven:
>>>> <additionalCompilerOptions>
>>>> -js-default-initializers=true;
>>>> -source-map=true;
>>>>
>>>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
>>>> </additionalCompilerOptions>
>>>>
>>>> The first 2 above are options I use during development - you may or may
>>>> not want those.
>>>>
>>>> I will try to make the full source of what I have available for
>>>> Cairngorm port in about 24 hours time from this email. I need to check all
>>>> the licence stuff. I have a test app working but no view-related Cairngorm
>>>> stuff yet.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <
>>>> gustavodecarli@gmail.com> wrote:
>>>>
>>>>> Hi .
>>>>>
>>>>> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was
>>>>> correct, the error does not reproduce anymore (null0).
>>>>> *Greg*. I tried the library and it worked correctly, I would like to
>>>>> know the implementation of the ServiceLocator.as how it is done, I made my
>>>>> own and although it worked, I have problems when I add a jewel tag in the
>>>>> project, for example a <j: Button>
>>>>>
>>>>> Is it possible or correct to have tag mx and jewel in the same project?
>>>>>
>>>>> *thanks to you .*
>>>>>
>>>>>
>>>>> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>>> Make sure your app is using the updated compiler. I assume you are
>>>>>> using Maven to compile the app? Check the pom.xml to make sure it is
>>>>>> referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version.
>>>>>> One trick is to add some System.out.println to the file that was changed
>>>>>> and see if it shows up in the output.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Regarding the tests, in the pom.xml for some of the projects like
>>>>>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>>>>>> which tests/files are run.
>>>>>>
>>>>>>
>>>>>>
>>>>>> HTH,
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Friday, February 7, 2020 at 3:15 AM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi, yesterday I tried with the change of Alex, from the
>>>>>> royale-compiler without success, the "null0" continues. I don't know if I
>>>>>> missed a step.
>>>>>>
>>>>>> I rebuilt with the royale-compiler project "mvn clean install" and
>>>>>> tried again the compilation of my project.
>>>>>>
>>>>>> On the other hand I am seeing to create a Test in the project, but I
>>>>>> see that they are not running the tests of the package "royale-compiler \
>>>>>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>>>>>> internal \ codegen \ mxml \ ...", do you know why?
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> Gustavo.
>>>>>>
>>>>>>
>>>>>>
>>>>>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>>>>>> escribió:
>>>>>>
>>>>>>
>>>>>> I'll try to get an minimal example working over my weekend sometime
>>>>>> to test what I have. I made a quick start on that, just to get something
>>>>>> that compiles. Once I see that it seems to be working I will release to git
>>>>>> repo for the port.
>>>>>>
>>>>>> If you do want to try a different swc from what you already have, you
>>>>>> could try one now from builds here I think:
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>>>>>
>>>>>>
>>>>>>
>>>>>> (I will remove that link in some days once the port is more
>>>>>> thoroughly tested and available to all)
>>>>>>
>>>>>>
>>>>>>
>>>>>> I was able to inspect and verify that the js build had a
>>>>>> ServicesLocator (as defined in that swc) mxml subclass which was populating
>>>>>> correctly with the recent compiler changes from Alex, but I am not yet able
>>>>>> to test more thoroughly. The view support probably won't work yet because
>>>>>> there are no 'added' and 'removed' events, but we will figure something out.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>>>>>>
>>>>>>
>>>>>> Alex, I tested this change today. There is more to it than that, it
>>>>>> seems. I will discuss details in dev list.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>>>>>
>>>>>> royale-compiler
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Sorry Alex, what repository is that of the push ?
>>>>>>
>>>>>>
>>>>>>
>>>>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>>>>> escribió:
>>>>>>
>>>>>> I just pushed a change to the compiler. It should now have valid
>>>>>> output for ServiceLocator.
>>>>>>
>>>>>>
>>>>>>
>>>>>> The compiler change was interesting in that I changed an else clause
>>>>>> that was put in to handle instances specified as children of top tags but
>>>>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>>>>> that code so none of our tests actually used that code, even though the
>>>>>> commit log implied it was for one of the tests. Either I made the earlier
>>>>>> change to propagate the fix for plain properties to instances or there is
>>>>>> some other scenario for instances as children (without a default property)
>>>>>> that I am not thinking of.
>>>>>>
>>>>>>
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we
>>>>>> save a lot of time in migrations where they use it and leave more time for
>>>>>> other questions.
>>>>>>
>>>>>> i will continue to test how to fill that array today.
>>>>>>
>>>>>> Thank you very much for everyone in this collaboration.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Gustavo.
>>>>>>
>>>>>>
>>>>>>
>>>>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<
>>>>>> carlosrovira@apache.org>) escribió:
>>>>>>
>>>>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the
>>>>>> words :)
>>>>>>
>>>>>>
>>>>>>
>>>>>> I know Cairngorm could be good for people wanting to migrate with the
>>>>>> less effort possible. Anyway, I recommend, if possible to try to switch to
>>>>>> Crux. We already did that several years ago in Flex, since all DI, IOC
>>>>>> stuff, make us be more efficient and increase options. For people creating
>>>>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>>>>> the Crux option if they continue evolving the app with new features...
>>>>>>
>>>>>>
>>>>>>
>>>>>> just my 2 :)
>>>>>>
>>>>>>
>>>>>>
>>>>>> Carlos
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<
>>>>>> jl03119@gmail.com>) escribió:
>>>>>>
>>>>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>>>>> Carlos, thanks all the times.^_^
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi Takeshita,
>>>>>>
>>>>>>
>>>>>>
>>>>>> Yes I think a few people have asked for Cairngorm or expressed
>>>>>> interest in it. Given the choice, I personally think Crux will be a more
>>>>>> modern/better option, but like I said, more people are asking for Cairngorm
>>>>>> now, so probably it makes sense to port that too.
>>>>>>
>>>>>>
>>>>>>
>>>>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>>>>> well for you. Please report any issues if you see them.
>>>>>>
>>>>>>
>>>>>>
>>>>>> One small thing: I definitely understand that you were referring to
>>>>>> the work I did on porting it to Royale, but just for the sake of anyone
>>>>>> else who reads this: it's definitely not 'my Crux framework'. The code is
>>>>>> ported from Swiz, and credit for the awesome features it has rests with the
>>>>>> original authors of Swiz (I was in contact with the original developer
>>>>>> during my efforts to port it to Royale).
>>>>>>
>>>>>> Also, just so people are aware, Carlos sponsored the majority of my
>>>>>> work on porting that, so you really have Carlos to thank for that.
>>>>>>
>>>>>>
>>>>>>
>>>>>> cheers,
>>>>>>
>>>>>> Greg
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>>>>> wrote:
>>>>>>
>>>>>> Greg,
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thanks for your work. We already have your Crux framework replacing
>>>>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>>>>> plenty of time of emulation work.
>>>>>>
>>>>>>
>>>>>>
>>>>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>>>>
>>>>>>
>>>>>> There does not appear to be a default property, like an array to put
>>>>>> the 'children' in. I think it just creates the children as instances and
>>>>>> makes sure they have id properties on the mxml-generated subclass that the
>>>>>> instances are assigned to.
>>>>>>
>>>>>>
>>>>>>
>>>>>> The services are then identified and categorised by iterating the
>>>>>> accessors of the ServiceLocator subclass via reflection and checking their
>>>>>> types and then registering them.
>>>>>>
>>>>>> Although it is and mxml instance of ServiceLocator, it is also an
>>>>>> enforced singleton which is accessed elsewhere from code. At least that is
>>>>>> how it appears to be set up to me.
>>>>>>
>>>>>>
>>>>>>
>>>>>> I already took a look at the code and have made (not many) local
>>>>>> changes and have the Cairngorm swc compiling via maven for both js and swf.
>>>>>> I have not tested it. Things like weak event listeners are gone.
>>>>>>
>>>>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>>>>> ViewHelper automated register/unregister. Maybe we can have a
>>>>>> CaingormViewBase class with support for these, or perhaps we can use the
>>>>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>>>>> be all that is needed, but it may not always work the same.
>>>>>>
>>>>>>
>>>>>>
>>>>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and
>>>>>> is permissive (
>>>>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>>>>>> It seems to be to be similar to others like MIT etc, but I don't know
>>>>>> specifically what the rules are for Apache with that licence (in terms of
>>>>>> possibility to include in Royale itself).
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>>>>> gustavodecarli@gmail.com> wrote:
>>>>>>
>>>>>> Alex :
>>>>>>
>>>>>>
>>>>>> In flex use the swc. I am seeing the same thing that you are
>>>>>> commenting, I do not understand where it assigns the remote objects to the
>>>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>>>> the RemoteObjects class. I will try to assign by code without using the
>>>>>> mxml to see if it does not generate the error "null0".
>>>>>>
>>>>>>
>>>>>>
>>>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>>>> escribió:
>>>>>>
>>>>>> I grabbed ServiceLocator.as and was able to produce the null0
>>>>>> problem, but the cause is that ServiceLocator does not have a default
>>>>>> property. Did your MXML work in Flex? What ServiceLocator property would
>>>>>> be assigned the mx:RemoteObject?
>>>>>>
>>>>>>
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>>>>>> and change.
>>>>>>
>>>>>>
>>>>>>
>>>>>> import flash.utils.describeType;
>>>>>>
>>>>>> --> import org.apache.royale.reflection.describeType;
>>>>>>
>>>>>> import flash.utils.Dictionary;
>>>>>>
>>>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>>>
>>>>>>
>>>>>>
>>>>>> And this method
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> /**
>>>>>>
>>>>>>
>>>>>>
>>>>>> * Return all the accessors on this object.
>>>>>>
>>>>>>
>>>>>>
>>>>>> * @param serviceLocator the IServiceLocator instance.
>>>>>>
>>>>>>
>>>>>>
>>>>>> * @return this object's accessors.
>>>>>>
>>>>>>
>>>>>>
>>>>>> */
>>>>>>
>>>>>>
>>>>>>
>>>>>> protected
>>>>>>
>>>>>> function getAccessors(
>>>>>>
>>>>>> serviceLocator : IServiceLocator ) :
>>>>>>
>>>>>> XMLList
>>>>>>
>>>>>>
>>>>>>
>>>>>> {
>>>>>>
>>>>>>
>>>>>>
>>>>>> /*
>>>>>>
>>>>>>
>>>>>>
>>>>>> var description : XML = describeType( serviceLocator );
>>>>>>
>>>>>>
>>>>>>
>>>>>> var accessors : XMLList = description.accessor.( @access ==
>>>>>> "readwrite" ).@name;
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> return accessors;
>>>>>>
>>>>>>
>>>>>>
>>>>>> */
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> return describeType( serviceLocator).accessors(@access ==
>>>>>>
>>>>>> "readwrite" ).@name;
>>>>>>
>>>>>>
>>>>>>
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>>>> escribió:
>>>>>>
>>>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>>>
>>>>>>
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>>
>>>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>>>> not easy, or requires some expertise.
>>>>>>
>>>>>> You can use Crux instead that has support for Cairngorm style
>>>>>> Commands. Crux is the same as Swiz Framework for Flex but rewritten to work
>>>>>> in Royale, and supports much more like dependency injection, Inversion of
>>>>>> control, event handling, ...
>>>>>>
>>>>>> You have 3 examples in the examples/crux folder you can check.
>>>>>>
>>>>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>>>>> Cairngorm
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>>>> gustavodecarli@gmail.com>) escribió:
>>>>>>
>>>>>> Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> <version>0.9.7-SNAPSHOT</version>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thank
>>>>>>
>>>>>>
>>>>>>
>>>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>>>> escribió:
>>>>>>
>>>>>> What version of the compiler are you using?
>>>>>>
>>>>>>
>>>>>>
>>>>>> What does the ServiceLocator source look like? It might be an issue
>>>>>> with defaultProperties for non-DOM objects.
>>>>>>
>>>>>>
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I am trying to transcribe gairngorm, at runtime it gives me an error
>>>>>> in the construction of the ServiceLocator, I understand that it is an error
>>>>>> of the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>>>
>>>>>> Thank
>>>>>>
>>>>>> Gustavo.
>>>>>>
>>>>>>
>>>>>>
>>>>>> *1. CODE *
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <cairngorm:ServiceLocator
>>>>>>
>>>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>>>>>> "
>>>>>>
>>>>>>
>>>>>>
>>>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>>>>>> "
>>>>>>
>>>>>>
>>>>>>
>>>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <mx:RemoteObject
>>>>>>
>>>>>> id="srvSeguridades"
>>>>>>
>>>>>>
>>>>>>
>>>>>> destination="seguridades"
>>>>>>
>>>>>>
>>>>>>
>>>>>> result="event.token.resultHandler(event)"
>>>>>>
>>>>>>
>>>>>>
>>>>>> fault="event.token.faultHandler(event)"
>>>>>>
>>>>>>
>>>>>>
>>>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> </cairngorm:ServiceLocator>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *2. LINE OF ERROR (RED)*
>>>>>>
>>>>>> /
>>>>>>
>>>>>>
>>>>>>
>>>>>> **
>>>>>> * @constructor
>>>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>>>> */
>>>>>> services.Servicio = function() {
>>>>>> services.Servicio.base(this, 'constructor');
>>>>>>
>>>>>> /**
>>>>>> * @private
>>>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>>>> */
>>>>>> this.srvSeguridades_;
>>>>>>
>>>>>> /**
>>>>>> * @private
>>>>>> * @type {Array}
>>>>>> */
>>>>>> this.mxmldd;
>>>>>>
>>>>>> /**
>>>>>> * @private
>>>>>> * @type {Array}
>>>>>> */
>>>>>> this.mxmldp;
>>>>>>
>>>>>> this.generateMXMLAttributes
>>>>>> ([1,
>>>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>>>> 3,
>>>>>> 'id',
>>>>>> true,
>>>>>> 'srvSeguridades',
>>>>>> 'destination',
>>>>>> true,
>>>>>> 'seguridades',
>>>>>> 'endpoint',
>>>>>> true,
>>>>>> 'http://localhost:8080/messagebroker/amf',
>>>>>> 0,
>>>>>> 2,
>>>>>> 'result',
>>>>>> this.$EH0,
>>>>>> 'fault',
>>>>>> this.$EH1,
>>>>>> null0, <- ERROR
>>>>>> 0
>>>>>> ]);
>>>>>>
>>>>>> };
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 3. Trace console log
>>>>>>
>>>>>>
>>>>>>
>>>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>>>> at new services.Servicio (Servicio.js:61)
>>>>>> at
>>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>>>> (MXMLDataInterpreter.js:126)
>>>>>> at
>>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>>>> (MXMLDataInterpreter.js:271)
>>>>>> at main.Main.mx.core.UIComponent.createChildren
>>>>>> (UIComponent.js:923)
>>>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>>>> at main.Main.mx.core.Application.createChildren
>>>>>> (Application.js:122)
>>>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>>>> at main.Main.mx.core.UIComponent.addedToParent
>>>>>> (UIComponent.js:417)
>>>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>>>> at
>>>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>>>> (UIBase.js:402)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Carlos Rovira
>>>>>>
>>>>>> http://about.me/carlosrovira
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Shoichiro Takeshita
>>>>>> 武下 祥一郎
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Shoichiro Takeshita
>>>>>> 武下 祥一郎
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Carlos Rovira
>>>>>>
>>>>>> http://about.me/carlosrovira
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Greg, Hi ,
Create a client server project model with cairngorm and the library you
provide. Although the project works, some points that I could not solve may
be able to guide me.
https://github.com/gustavodecarli/apache-royale-cairngorm
Click in the green Button, the result
[image: image.png]
.
*1, Compiling with the royale maven pluging and adding the cairngorm
library gives this error, you see the compilation line it generates. The
strange thing is that since VSCODE does not give compilation error *
./Cairngorm/mvn royale:compile-app
[*INFO*] *--- *royale-maven-plugin:0.9.7-SNAPSHOT:compile-app
*(default-cli)* @ Cairngorm* ---*
[*INFO*] Executing MXMLC in tool group Royale with args:
[-load-config=/Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/target/compile-app-config.xml,
-js-default-initializers=true,
-keep-as3-metadata+=DefaultProperty,Inject,Dispatcher,EventHandler,PostConstruct,PreDestroy,ViewAdded,ViewRemoved,Bindable,Transient,
-keep-code-with-metadata=Inject, -js-dynamic-access-unknown-members,
-source-map=true,
-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css:,cairngorm-js.swc,
+configname=flex, -js-library-path=libs/cairngorm-js.swc,
-js-output=/Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/target/javascript,
-compiler.targets=JSRoyale,
/Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/src/main/royale/App.mxml]
/Users/gustavo/Documents/Desarrollo/royale/test/apache-royale-cairngorm/Cairngorm/src/main/royale/App.mxml(2):
col: 1 Error: This tag could not be resolved to an ActionScript class. It
will be ignored.
<mx:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
2. Other question, getter y setter from private attributes, require
explicit bindable ?
package entidadesbasicas.modelo.entidades
{
[Bindable]
public class MonedaBase {
private var _codigo:String;
private var _descripcion:String;
[Bindable]
public function get codigo():String{
return this._codigo;
}
[Bindable]
public function get descripcion():String{
return this._descripcion;
}
[Bindable]
public function set codigo(value:String):void{
this._codigo = value;
}
[Bindable]
public function set descripcion(value:String):void{
this._descripcion = value;
}
}
3. The columns width do not order no is correct.
4. I had to force the assignment of the dataprovider on the grid
in ./Cairngorm App.mxml
<mx:DataGrid id="grdData" dataProvider="{modelo.dataProvider}">
<mx:columns>
<mx:DataGridColumn dataField="codigo"/>
<mx:DataGridColumn dataField="descripcion"/>
</mx:columns>
</mx:DataGrid>
private function onResult(e:Event):void{
Alert.show(this.modelo.dataProvider.length + " rows ", "Result Finish") ;
//This is requerid ?
this.grdData.dataProvider = this.modelo.dataProvider;
console.log(this.modelo.dataProvider);
}
I'm going to try the same example in Jewel
greetings to all
El mar., 11 feb. 2020 a las 4:54, Greg Dove (<gr...@gmail.com>)
escribió:
> Hi Gustavo,
>
> I did not (again) get to spend time on this as I had hoped to.
> But just in case it is useful to you, I have put the current source code
> in the same dropbox fileset. All the original Adobe licence headers should
> still be present unless I missed something, I will check this more
> thoroughly and I will probably push to a git repo this coming weekend along
> with a working example, after I solved the issue with the ADDED and REMOVED
> events in the view helper support.
>
>
>
> On Mon, Feb 10, 2020 at 8:16 PM Greg Dove <gr...@gmail.com> wrote:
>
>>
>> "I will try to make the full source of what I have available for
>> Cairngorm port in about 24 hours time from this email. I need to check all
>> the licence stuff. "
>>
>> Sorry, I did not get to the above yet as I had hoped, but I will find
>> time tomorrow local time. It turns out that I might need to use this myself
>> for a client.
>>
>>
>>
>> On Sun, Feb 9, 2020 at 7:30 PM Greg Dove <gr...@gmail.com> wrote:
>>
>>>
>>> There is a css clash between Jewel and MXRoyale, and there might be more
>>> issues at the child element level with different required base classes etc,
>>> but I am not sure because I did not try that. Alex will undoubtedly explain
>>> better than me.
>>> I am pretty sure you cannot use MXRoyale visual components combined with
>>> Jewel in the same project. But you do need the service related classes from
>>> MXRoyale for Cairngorm.
>>>
>>> I am testing Cairngorm using 'Express', but if you want to use Jewel
>>> (e.g. always <j:Button or <j:SomethingElse and never <mx:Something), the
>>> following should work so that you can still use the service classes from MX
>>> (which Cairngorm has hard dependencies for).
>>>
>>> Below is what I am doing... you need to add the third option of the
>>> following in maven:
>>> <additionalCompilerOptions>
>>> -js-default-initializers=true;
>>> -source-map=true;
>>>
>>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
>>> </additionalCompilerOptions>
>>>
>>> The first 2 above are options I use during development - you may or may
>>> not want those.
>>>
>>> I will try to make the full source of what I have available for
>>> Cairngorm port in about 24 hours time from this email. I need to check all
>>> the licence stuff. I have a test app working but no view-related Cairngorm
>>> stuff yet.
>>>
>>>
>>>
>>>
>>>
>>> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <
>>> gustavodecarli@gmail.com> wrote:
>>>
>>>> Hi .
>>>>
>>>> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was
>>>> correct, the error does not reproduce anymore (null0).
>>>> *Greg*. I tried the library and it worked correctly, I would like to
>>>> know the implementation of the ServiceLocator.as how it is done, I made my
>>>> own and although it worked, I have problems when I add a jewel tag in the
>>>> project, for example a <j: Button>
>>>>
>>>> Is it possible or correct to have tag mx and jewel in the same project?
>>>>
>>>> *thanks to you .*
>>>>
>>>>
>>>> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>>> Make sure your app is using the updated compiler. I assume you are
>>>>> using Maven to compile the app? Check the pom.xml to make sure it is
>>>>> referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version.
>>>>> One trick is to add some System.out.println to the file that was changed
>>>>> and see if it shows up in the output.
>>>>>
>>>>>
>>>>>
>>>>> Regarding the tests, in the pom.xml for some of the projects like
>>>>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>>>>> which tests/files are run.
>>>>>
>>>>>
>>>>>
>>>>> HTH,
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Friday, February 7, 2020 at 3:15 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Hi, yesterday I tried with the change of Alex, from the
>>>>> royale-compiler without success, the "null0" continues. I don't know if I
>>>>> missed a step.
>>>>>
>>>>> I rebuilt with the royale-compiler project "mvn clean install" and
>>>>> tried again the compilation of my project.
>>>>>
>>>>> On the other hand I am seeing to create a Test in the project, but I
>>>>> see that they are not running the tests of the package "royale-compiler \
>>>>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>>>>> internal \ codegen \ mxml \ ...", do you know why?
>>>>>
>>>>>
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Gustavo.
>>>>>
>>>>>
>>>>>
>>>>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>>>>> escribió:
>>>>>
>>>>>
>>>>> I'll try to get an minimal example working over my weekend sometime to
>>>>> test what I have. I made a quick start on that, just to get something that
>>>>> compiles. Once I see that it seems to be working I will release to git repo
>>>>> for the port.
>>>>>
>>>>> If you do want to try a different swc from what you already have, you
>>>>> could try one now from builds here I think:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>>>>
>>>>>
>>>>>
>>>>> (I will remove that link in some days once the port is more thoroughly
>>>>> tested and available to all)
>>>>>
>>>>>
>>>>>
>>>>> I was able to inspect and verify that the js build had a
>>>>> ServicesLocator (as defined in that swc) mxml subclass which was populating
>>>>> correctly with the recent compiler changes from Alex, but I am not yet able
>>>>> to test more thoroughly. The view support probably won't work yet because
>>>>> there are no 'added' and 'removed' events, but we will figure something out.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>>>>>
>>>>>
>>>>> Alex, I tested this change today. There is more to it than that, it
>>>>> seems. I will discuss details in dev list.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>>>>
>>>>> royale-compiler
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>> Sorry Alex, what repository is that of the push ?
>>>>>
>>>>>
>>>>>
>>>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> I just pushed a change to the compiler. It should now have valid
>>>>> output for ServiceLocator.
>>>>>
>>>>>
>>>>>
>>>>> The compiler change was interesting in that I changed an else clause
>>>>> that was put in to handle instances specified as children of top tags but
>>>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>>>> that code so none of our tests actually used that code, even though the
>>>>> commit log implied it was for one of the tests. Either I made the earlier
>>>>> change to propagate the fix for plain properties to instances or there is
>>>>> some other scenario for instances as children (without a default property)
>>>>> that I am not thinking of.
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we
>>>>> save a lot of time in migrations where they use it and leave more time for
>>>>> other questions.
>>>>>
>>>>> i will continue to test how to fill that array today.
>>>>>
>>>>> Thank you very much for everyone in this collaboration.
>>>>>
>>>>>
>>>>>
>>>>> Gustavo.
>>>>>
>>>>>
>>>>>
>>>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<
>>>>> carlosrovira@apache.org>) escribió:
>>>>>
>>>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the
>>>>> words :)
>>>>>
>>>>>
>>>>>
>>>>> I know Cairngorm could be good for people wanting to migrate with the
>>>>> less effort possible. Anyway, I recommend, if possible to try to switch to
>>>>> Crux. We already did that several years ago in Flex, since all DI, IOC
>>>>> stuff, make us be more efficient and increase options. For people creating
>>>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>>>> the Crux option if they continue evolving the app with new features...
>>>>>
>>>>>
>>>>>
>>>>> just my 2 :)
>>>>>
>>>>>
>>>>>
>>>>> Carlos
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<
>>>>> jl03119@gmail.com>) escribió:
>>>>>
>>>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>>>> Carlos, thanks all the times.^_^
>>>>>
>>>>>
>>>>>
>>>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>>>
>>>>>
>>>>>
>>>>> Hi Takeshita,
>>>>>
>>>>>
>>>>>
>>>>> Yes I think a few people have asked for Cairngorm or expressed
>>>>> interest in it. Given the choice, I personally think Crux will be a more
>>>>> modern/better option, but like I said, more people are asking for Cairngorm
>>>>> now, so probably it makes sense to port that too.
>>>>>
>>>>>
>>>>>
>>>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>>>> well for you. Please report any issues if you see them.
>>>>>
>>>>>
>>>>>
>>>>> One small thing: I definitely understand that you were referring to
>>>>> the work I did on porting it to Royale, but just for the sake of anyone
>>>>> else who reads this: it's definitely not 'my Crux framework'. The code is
>>>>> ported from Swiz, and credit for the awesome features it has rests with the
>>>>> original authors of Swiz (I was in contact with the original developer
>>>>> during my efforts to port it to Royale).
>>>>>
>>>>> Also, just so people are aware, Carlos sponsored the majority of my
>>>>> work on porting that, so you really have Carlos to thank for that.
>>>>>
>>>>>
>>>>>
>>>>> cheers,
>>>>>
>>>>> Greg
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Greg,
>>>>>
>>>>>
>>>>>
>>>>> Thanks for your work. We already have your Crux framework replacing
>>>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>>>> plenty of time of emulation work.
>>>>>
>>>>>
>>>>>
>>>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>>>
>>>>>
>>>>> There does not appear to be a default property, like an array to put
>>>>> the 'children' in. I think it just creates the children as instances and
>>>>> makes sure they have id properties on the mxml-generated subclass that the
>>>>> instances are assigned to.
>>>>>
>>>>>
>>>>>
>>>>> The services are then identified and categorised by iterating the
>>>>> accessors of the ServiceLocator subclass via reflection and checking their
>>>>> types and then registering them.
>>>>>
>>>>> Although it is and mxml instance of ServiceLocator, it is also an
>>>>> enforced singleton which is accessed elsewhere from code. At least that is
>>>>> how it appears to be set up to me.
>>>>>
>>>>>
>>>>>
>>>>> I already took a look at the code and have made (not many) local
>>>>> changes and have the Cairngorm swc compiling via maven for both js and swf.
>>>>> I have not tested it. Things like weak event listeners are gone.
>>>>>
>>>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>>>> ViewHelper automated register/unregister. Maybe we can have a
>>>>> CaingormViewBase class with support for these, or perhaps we can use the
>>>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>>>> be all that is needed, but it may not always work the same.
>>>>>
>>>>>
>>>>>
>>>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and
>>>>> is permissive (
>>>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>>>>> It seems to be to be similar to others like MIT etc, but I don't know
>>>>> specifically what the rules are for Apache with that licence (in terms of
>>>>> possibility to include in Royale itself).
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>>>> gustavodecarli@gmail.com> wrote:
>>>>>
>>>>> Alex :
>>>>>
>>>>>
>>>>> In flex use the swc. I am seeing the same thing that you are
>>>>> commenting, I do not understand where it assigns the remote objects to the
>>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>>> the RemoteObjects class. I will try to assign by code without using the
>>>>> mxml to see if it does not generate the error "null0".
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>>>> but the cause is that ServiceLocator does not have a default property. Did
>>>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>>>> mx:RemoteObject?
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>>>>> and change.
>>>>>
>>>>>
>>>>>
>>>>> import flash.utils.describeType;
>>>>>
>>>>> --> import org.apache.royale.reflection.describeType;
>>>>>
>>>>> import flash.utils.Dictionary;
>>>>>
>>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>>
>>>>>
>>>>>
>>>>> And this method
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>>
>>>>>
>>>>> * Return all the accessors on this object.
>>>>>
>>>>>
>>>>>
>>>>> * @param serviceLocator the IServiceLocator instance.
>>>>>
>>>>>
>>>>>
>>>>> * @return this object's accessors.
>>>>>
>>>>>
>>>>>
>>>>> */
>>>>>
>>>>>
>>>>>
>>>>> protected
>>>>>
>>>>> function getAccessors(
>>>>>
>>>>> serviceLocator : IServiceLocator ) :
>>>>>
>>>>> XMLList
>>>>>
>>>>>
>>>>>
>>>>> {
>>>>>
>>>>>
>>>>>
>>>>> /*
>>>>>
>>>>>
>>>>>
>>>>> var description : XML = describeType( serviceLocator );
>>>>>
>>>>>
>>>>>
>>>>> var accessors : XMLList = description.accessor.( @access ==
>>>>> "readwrite" ).@name;
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> return accessors;
>>>>>
>>>>>
>>>>>
>>>>> */
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> return describeType( serviceLocator).accessors(@access ==
>>>>>
>>>>> "readwrite" ).@name;
>>>>>
>>>>>
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>>
>>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>>> not easy, or requires some expertise.
>>>>>
>>>>> You can use Crux instead that has support for Cairngorm style
>>>>> Commands. Crux is the same as Swiz Framework for Flex but rewritten to work
>>>>> in Royale, and supports much more like dependency injection, Inversion of
>>>>> control, event handling, ...
>>>>>
>>>>> You have 3 examples in the examples/crux folder you can check.
>>>>>
>>>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>>>> Cairngorm
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>>> gustavodecarli@gmail.com>) escribió:
>>>>>
>>>>> Alex
>>>>>
>>>>>
>>>>>
>>>>> <version>0.9.7-SNAPSHOT</version>
>>>>>
>>>>>
>>>>>
>>>>> Thank
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> What version of the compiler are you using?
>>>>>
>>>>>
>>>>>
>>>>> What does the ServiceLocator source look like? It might be an issue
>>>>> with defaultProperties for non-DOM objects.
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I am trying to transcribe gairngorm, at runtime it gives me an error
>>>>> in the construction of the ServiceLocator, I understand that it is an error
>>>>> of the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>>
>>>>> Thank
>>>>>
>>>>> Gustavo.
>>>>>
>>>>>
>>>>>
>>>>> *1. CODE *
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>
>>>>>
>>>>>
>>>>> <cairngorm:ServiceLocator
>>>>>
>>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>>>>> "
>>>>>
>>>>>
>>>>>
>>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>>>>> "
>>>>>
>>>>>
>>>>>
>>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <mx:RemoteObject
>>>>>
>>>>> id="srvSeguridades"
>>>>>
>>>>>
>>>>>
>>>>> destination="seguridades"
>>>>>
>>>>>
>>>>>
>>>>> result="event.token.resultHandler(event)"
>>>>>
>>>>>
>>>>>
>>>>> fault="event.token.faultHandler(event)"
>>>>>
>>>>>
>>>>>
>>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> </cairngorm:ServiceLocator>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *2. LINE OF ERROR (RED)*
>>>>>
>>>>> /
>>>>>
>>>>>
>>>>>
>>>>> **
>>>>> * @constructor
>>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>>> */
>>>>> services.Servicio = function() {
>>>>> services.Servicio.base(this, 'constructor');
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>>> */
>>>>> this.srvSeguridades_;
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {Array}
>>>>> */
>>>>> this.mxmldd;
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {Array}
>>>>> */
>>>>> this.mxmldp;
>>>>>
>>>>> this.generateMXMLAttributes
>>>>> ([1,
>>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>>> 3,
>>>>> 'id',
>>>>> true,
>>>>> 'srvSeguridades',
>>>>> 'destination',
>>>>> true,
>>>>> 'seguridades',
>>>>> 'endpoint',
>>>>> true,
>>>>> 'http://localhost:8080/messagebroker/amf',
>>>>> 0,
>>>>> 2,
>>>>> 'result',
>>>>> this.$EH0,
>>>>> 'fault',
>>>>> this.$EH1,
>>>>> null0, <- ERROR
>>>>> 0
>>>>> ]);
>>>>>
>>>>> };
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 3. Trace console log
>>>>>
>>>>>
>>>>>
>>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>>> at new services.Servicio (Servicio.js:61)
>>>>> at
>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>>> (MXMLDataInterpreter.js:126)
>>>>> at
>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>>> (MXMLDataInterpreter.js:271)
>>>>> at main.Main.mx.core.UIComponent.createChildren
>>>>> (UIComponent.js:923)
>>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>>> at main.Main.mx.core.Application.createChildren
>>>>> (Application.js:122)
>>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>>> at
>>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>>> (UIBase.js:402)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Carlos Rovira
>>>>>
>>>>> http://about.me/carlosrovira
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Shoichiro Takeshita
>>>>> 武下 祥一郎
>>>>>
>>>>> --
>>>>>
>>>>> Shoichiro Takeshita
>>>>> 武下 祥一郎
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Carlos Rovira
>>>>>
>>>>> http://about.me/carlosrovira
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>>>>
>>>>>
>>>>>
>>>>>
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Hi Greg
Thank you for your concern, but you didn't have to give reasons, I didn't
have time to upload a clearer example for the rest, I'm working these days.
Greetings and thank you very much.
Gustsavo
El mar., 11 feb. 2020 a las 4:54, Greg Dove (<gr...@gmail.com>)
escribió:
> Hi Gustavo,
>
> I did not (again) get to spend time on this as I had hoped to.
> But just in case it is useful to you, I have put the current source code
> in the same dropbox fileset. All the original Adobe licence headers should
> still be present unless I missed something, I will check this more
> thoroughly and I will probably push to a git repo this coming weekend along
> with a working example, after I solved the issue with the ADDED and REMOVED
> events in the view helper support.
>
>
>
> On Mon, Feb 10, 2020 at 8:16 PM Greg Dove <gr...@gmail.com> wrote:
>
>>
>> "I will try to make the full source of what I have available for
>> Cairngorm port in about 24 hours time from this email. I need to check all
>> the licence stuff. "
>>
>> Sorry, I did not get to the above yet as I had hoped, but I will find
>> time tomorrow local time. It turns out that I might need to use this myself
>> for a client.
>>
>>
>>
>> On Sun, Feb 9, 2020 at 7:30 PM Greg Dove <gr...@gmail.com> wrote:
>>
>>>
>>> There is a css clash between Jewel and MXRoyale, and there might be more
>>> issues at the child element level with different required base classes etc,
>>> but I am not sure because I did not try that. Alex will undoubtedly explain
>>> better than me.
>>> I am pretty sure you cannot use MXRoyale visual components combined with
>>> Jewel in the same project. But you do need the service related classes from
>>> MXRoyale for Cairngorm.
>>>
>>> I am testing Cairngorm using 'Express', but if you want to use Jewel
>>> (e.g. always <j:Button or <j:SomethingElse and never <mx:Something), the
>>> following should work so that you can still use the service classes from MX
>>> (which Cairngorm has hard dependencies for).
>>>
>>> Below is what I am doing... you need to add the third option of the
>>> following in maven:
>>> <additionalCompilerOptions>
>>> -js-default-initializers=true;
>>> -source-map=true;
>>>
>>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
>>> </additionalCompilerOptions>
>>>
>>> The first 2 above are options I use during development - you may or may
>>> not want those.
>>>
>>> I will try to make the full source of what I have available for
>>> Cairngorm port in about 24 hours time from this email. I need to check all
>>> the licence stuff. I have a test app working but no view-related Cairngorm
>>> stuff yet.
>>>
>>>
>>>
>>>
>>>
>>> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <
>>> gustavodecarli@gmail.com> wrote:
>>>
>>>> Hi .
>>>>
>>>> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was
>>>> correct, the error does not reproduce anymore (null0).
>>>> *Greg*. I tried the library and it worked correctly, I would like to
>>>> know the implementation of the ServiceLocator.as how it is done, I made my
>>>> own and although it worked, I have problems when I add a jewel tag in the
>>>> project, for example a <j: Button>
>>>>
>>>> Is it possible or correct to have tag mx and jewel in the same project?
>>>>
>>>> *thanks to you .*
>>>>
>>>>
>>>> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>>> Make sure your app is using the updated compiler. I assume you are
>>>>> using Maven to compile the app? Check the pom.xml to make sure it is
>>>>> referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version.
>>>>> One trick is to add some System.out.println to the file that was changed
>>>>> and see if it shows up in the output.
>>>>>
>>>>>
>>>>>
>>>>> Regarding the tests, in the pom.xml for some of the projects like
>>>>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>>>>> which tests/files are run.
>>>>>
>>>>>
>>>>>
>>>>> HTH,
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Friday, February 7, 2020 at 3:15 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Hi, yesterday I tried with the change of Alex, from the
>>>>> royale-compiler without success, the "null0" continues. I don't know if I
>>>>> missed a step.
>>>>>
>>>>> I rebuilt with the royale-compiler project "mvn clean install" and
>>>>> tried again the compilation of my project.
>>>>>
>>>>> On the other hand I am seeing to create a Test in the project, but I
>>>>> see that they are not running the tests of the package "royale-compiler \
>>>>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>>>>> internal \ codegen \ mxml \ ...", do you know why?
>>>>>
>>>>>
>>>>>
>>>>> Thanks.
>>>>>
>>>>> Gustavo.
>>>>>
>>>>>
>>>>>
>>>>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>>>>> escribió:
>>>>>
>>>>>
>>>>> I'll try to get an minimal example working over my weekend sometime to
>>>>> test what I have. I made a quick start on that, just to get something that
>>>>> compiles. Once I see that it seems to be working I will release to git repo
>>>>> for the port.
>>>>>
>>>>> If you do want to try a different swc from what you already have, you
>>>>> could try one now from builds here I think:
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>>>>
>>>>>
>>>>>
>>>>> (I will remove that link in some days once the port is more thoroughly
>>>>> tested and available to all)
>>>>>
>>>>>
>>>>>
>>>>> I was able to inspect and verify that the js build had a
>>>>> ServicesLocator (as defined in that swc) mxml subclass which was populating
>>>>> correctly with the recent compiler changes from Alex, but I am not yet able
>>>>> to test more thoroughly. The view support probably won't work yet because
>>>>> there are no 'added' and 'removed' events, but we will figure something out.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>>>>>
>>>>>
>>>>> Alex, I tested this change today. There is more to it than that, it
>>>>> seems. I will discuss details in dev list.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>>>>
>>>>> royale-compiler
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>> Sorry Alex, what repository is that of the push ?
>>>>>
>>>>>
>>>>>
>>>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> I just pushed a change to the compiler. It should now have valid
>>>>> output for ServiceLocator.
>>>>>
>>>>>
>>>>>
>>>>> The compiler change was interesting in that I changed an else clause
>>>>> that was put in to handle instances specified as children of top tags but
>>>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>>>> that code so none of our tests actually used that code, even though the
>>>>> commit log implied it was for one of the tests. Either I made the earlier
>>>>> change to propagate the fix for plain properties to instances or there is
>>>>> some other scenario for instances as children (without a default property)
>>>>> that I am not thinking of.
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we
>>>>> save a lot of time in migrations where they use it and leave more time for
>>>>> other questions.
>>>>>
>>>>> i will continue to test how to fill that array today.
>>>>>
>>>>> Thank you very much for everyone in this collaboration.
>>>>>
>>>>>
>>>>>
>>>>> Gustavo.
>>>>>
>>>>>
>>>>>
>>>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<
>>>>> carlosrovira@apache.org>) escribió:
>>>>>
>>>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the
>>>>> words :)
>>>>>
>>>>>
>>>>>
>>>>> I know Cairngorm could be good for people wanting to migrate with the
>>>>> less effort possible. Anyway, I recommend, if possible to try to switch to
>>>>> Crux. We already did that several years ago in Flex, since all DI, IOC
>>>>> stuff, make us be more efficient and increase options. For people creating
>>>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>>>> the Crux option if they continue evolving the app with new features...
>>>>>
>>>>>
>>>>>
>>>>> just my 2 :)
>>>>>
>>>>>
>>>>>
>>>>> Carlos
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<
>>>>> jl03119@gmail.com>) escribió:
>>>>>
>>>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>>>> Carlos, thanks all the times.^_^
>>>>>
>>>>>
>>>>>
>>>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>>>
>>>>>
>>>>>
>>>>> Hi Takeshita,
>>>>>
>>>>>
>>>>>
>>>>> Yes I think a few people have asked for Cairngorm or expressed
>>>>> interest in it. Given the choice, I personally think Crux will be a more
>>>>> modern/better option, but like I said, more people are asking for Cairngorm
>>>>> now, so probably it makes sense to port that too.
>>>>>
>>>>>
>>>>>
>>>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>>>> well for you. Please report any issues if you see them.
>>>>>
>>>>>
>>>>>
>>>>> One small thing: I definitely understand that you were referring to
>>>>> the work I did on porting it to Royale, but just for the sake of anyone
>>>>> else who reads this: it's definitely not 'my Crux framework'. The code is
>>>>> ported from Swiz, and credit for the awesome features it has rests with the
>>>>> original authors of Swiz (I was in contact with the original developer
>>>>> during my efforts to port it to Royale).
>>>>>
>>>>> Also, just so people are aware, Carlos sponsored the majority of my
>>>>> work on porting that, so you really have Carlos to thank for that.
>>>>>
>>>>>
>>>>>
>>>>> cheers,
>>>>>
>>>>> Greg
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>>>> wrote:
>>>>>
>>>>> Greg,
>>>>>
>>>>>
>>>>>
>>>>> Thanks for your work. We already have your Crux framework replacing
>>>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>>>> plenty of time of emulation work.
>>>>>
>>>>>
>>>>>
>>>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>>>
>>>>>
>>>>> There does not appear to be a default property, like an array to put
>>>>> the 'children' in. I think it just creates the children as instances and
>>>>> makes sure they have id properties on the mxml-generated subclass that the
>>>>> instances are assigned to.
>>>>>
>>>>>
>>>>>
>>>>> The services are then identified and categorised by iterating the
>>>>> accessors of the ServiceLocator subclass via reflection and checking their
>>>>> types and then registering them.
>>>>>
>>>>> Although it is and mxml instance of ServiceLocator, it is also an
>>>>> enforced singleton which is accessed elsewhere from code. At least that is
>>>>> how it appears to be set up to me.
>>>>>
>>>>>
>>>>>
>>>>> I already took a look at the code and have made (not many) local
>>>>> changes and have the Cairngorm swc compiling via maven for both js and swf.
>>>>> I have not tested it. Things like weak event listeners are gone.
>>>>>
>>>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>>>> ViewHelper automated register/unregister. Maybe we can have a
>>>>> CaingormViewBase class with support for these, or perhaps we can use the
>>>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>>>> be all that is needed, but it may not always work the same.
>>>>>
>>>>>
>>>>>
>>>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and
>>>>> is permissive (
>>>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>>>>> It seems to be to be similar to others like MIT etc, but I don't know
>>>>> specifically what the rules are for Apache with that licence (in terms of
>>>>> possibility to include in Royale itself).
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>>>> gustavodecarli@gmail.com> wrote:
>>>>>
>>>>> Alex :
>>>>>
>>>>>
>>>>> In flex use the swc. I am seeing the same thing that you are
>>>>> commenting, I do not understand where it assigns the remote objects to the
>>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>>> the RemoteObjects class. I will try to assign by code without using the
>>>>> mxml to see if it does not generate the error "null0".
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>>>> but the cause is that ServiceLocator does not have a default property. Did
>>>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>>>> mx:RemoteObject?
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>>>>> and change.
>>>>>
>>>>>
>>>>>
>>>>> import flash.utils.describeType;
>>>>>
>>>>> --> import org.apache.royale.reflection.describeType;
>>>>>
>>>>> import flash.utils.Dictionary;
>>>>>
>>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>>
>>>>>
>>>>>
>>>>> And this method
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>>
>>>>>
>>>>> * Return all the accessors on this object.
>>>>>
>>>>>
>>>>>
>>>>> * @param serviceLocator the IServiceLocator instance.
>>>>>
>>>>>
>>>>>
>>>>> * @return this object's accessors.
>>>>>
>>>>>
>>>>>
>>>>> */
>>>>>
>>>>>
>>>>>
>>>>> protected
>>>>>
>>>>> function getAccessors(
>>>>>
>>>>> serviceLocator : IServiceLocator ) :
>>>>>
>>>>> XMLList
>>>>>
>>>>>
>>>>>
>>>>> {
>>>>>
>>>>>
>>>>>
>>>>> /*
>>>>>
>>>>>
>>>>>
>>>>> var description : XML = describeType( serviceLocator );
>>>>>
>>>>>
>>>>>
>>>>> var accessors : XMLList = description.accessor.( @access ==
>>>>> "readwrite" ).@name;
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> return accessors;
>>>>>
>>>>>
>>>>>
>>>>> */
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> return describeType( serviceLocator).accessors(@access ==
>>>>>
>>>>> "readwrite" ).@name;
>>>>>
>>>>>
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>>
>>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>>> not easy, or requires some expertise.
>>>>>
>>>>> You can use Crux instead that has support for Cairngorm style
>>>>> Commands. Crux is the same as Swiz Framework for Flex but rewritten to work
>>>>> in Royale, and supports much more like dependency injection, Inversion of
>>>>> control, event handling, ...
>>>>>
>>>>> You have 3 examples in the examples/crux folder you can check.
>>>>>
>>>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>>>> Cairngorm
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>>> gustavodecarli@gmail.com>) escribió:
>>>>>
>>>>> Alex
>>>>>
>>>>>
>>>>>
>>>>> <version>0.9.7-SNAPSHOT</version>
>>>>>
>>>>>
>>>>>
>>>>> Thank
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> What version of the compiler are you using?
>>>>>
>>>>>
>>>>>
>>>>> What does the ServiceLocator source look like? It might be an issue
>>>>> with defaultProperties for non-DOM objects.
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I am trying to transcribe gairngorm, at runtime it gives me an error
>>>>> in the construction of the ServiceLocator, I understand that it is an error
>>>>> of the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>>
>>>>> Thank
>>>>>
>>>>> Gustavo.
>>>>>
>>>>>
>>>>>
>>>>> *1. CODE *
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>
>>>>>
>>>>>
>>>>> <cairngorm:ServiceLocator
>>>>>
>>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>>>>> "
>>>>>
>>>>>
>>>>>
>>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>>>>> "
>>>>>
>>>>>
>>>>>
>>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <mx:RemoteObject
>>>>>
>>>>> id="srvSeguridades"
>>>>>
>>>>>
>>>>>
>>>>> destination="seguridades"
>>>>>
>>>>>
>>>>>
>>>>> result="event.token.resultHandler(event)"
>>>>>
>>>>>
>>>>>
>>>>> fault="event.token.faultHandler(event)"
>>>>>
>>>>>
>>>>>
>>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> </cairngorm:ServiceLocator>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *2. LINE OF ERROR (RED)*
>>>>>
>>>>> /
>>>>>
>>>>>
>>>>>
>>>>> **
>>>>> * @constructor
>>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>>> */
>>>>> services.Servicio = function() {
>>>>> services.Servicio.base(this, 'constructor');
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>>> */
>>>>> this.srvSeguridades_;
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {Array}
>>>>> */
>>>>> this.mxmldd;
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {Array}
>>>>> */
>>>>> this.mxmldp;
>>>>>
>>>>> this.generateMXMLAttributes
>>>>> ([1,
>>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>>> 3,
>>>>> 'id',
>>>>> true,
>>>>> 'srvSeguridades',
>>>>> 'destination',
>>>>> true,
>>>>> 'seguridades',
>>>>> 'endpoint',
>>>>> true,
>>>>> 'http://localhost:8080/messagebroker/amf',
>>>>> 0,
>>>>> 2,
>>>>> 'result',
>>>>> this.$EH0,
>>>>> 'fault',
>>>>> this.$EH1,
>>>>> null0, <- ERROR
>>>>> 0
>>>>> ]);
>>>>>
>>>>> };
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 3. Trace console log
>>>>>
>>>>>
>>>>>
>>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>>> at new services.Servicio (Servicio.js:61)
>>>>> at
>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>>> (MXMLDataInterpreter.js:126)
>>>>> at
>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>>> (MXMLDataInterpreter.js:271)
>>>>> at main.Main.mx.core.UIComponent.createChildren
>>>>> (UIComponent.js:923)
>>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>>> at main.Main.mx.core.Application.createChildren
>>>>> (Application.js:122)
>>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>>> at
>>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>>> (UIBase.js:402)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Carlos Rovira
>>>>>
>>>>> http://about.me/carlosrovira
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Shoichiro Takeshita
>>>>> 武下 祥一郎
>>>>>
>>>>> --
>>>>>
>>>>> Shoichiro Takeshita
>>>>> 武下 祥一郎
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Carlos Rovira
>>>>>
>>>>> http://about.me/carlosrovira
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>>>>
>>>>>
>>>>>
>>>>>
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
Hi Gustavo,
I did not (again) get to spend time on this as I had hoped to.
But just in case it is useful to you, I have put the current source code in
the same dropbox fileset. All the original Adobe licence headers should
still be present unless I missed something, I will check this more
thoroughly and I will probably push to a git repo this coming weekend along
with a working example, after I solved the issue with the ADDED and REMOVED
events in the view helper support.
On Mon, Feb 10, 2020 at 8:16 PM Greg Dove <gr...@gmail.com> wrote:
>
> "I will try to make the full source of what I have available for Cairngorm
> port in about 24 hours time from this email. I need to check all the
> licence stuff. "
>
> Sorry, I did not get to the above yet as I had hoped, but I will find time
> tomorrow local time. It turns out that I might need to use this myself for
> a client.
>
>
>
> On Sun, Feb 9, 2020 at 7:30 PM Greg Dove <gr...@gmail.com> wrote:
>
>>
>> There is a css clash between Jewel and MXRoyale, and there might be more
>> issues at the child element level with different required base classes etc,
>> but I am not sure because I did not try that. Alex will undoubtedly explain
>> better than me.
>> I am pretty sure you cannot use MXRoyale visual components combined with
>> Jewel in the same project. But you do need the service related classes from
>> MXRoyale for Cairngorm.
>>
>> I am testing Cairngorm using 'Express', but if you want to use Jewel
>> (e.g. always <j:Button or <j:SomethingElse and never <mx:Something), the
>> following should work so that you can still use the service classes from MX
>> (which Cairngorm has hard dependencies for).
>>
>> Below is what I am doing... you need to add the third option of the
>> following in maven:
>> <additionalCompilerOptions>
>> -js-default-initializers=true;
>> -source-map=true;
>>
>> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
>> </additionalCompilerOptions>
>>
>> The first 2 above are options I use during development - you may or may
>> not want those.
>>
>> I will try to make the full source of what I have available for Cairngorm
>> port in about 24 hours time from this email. I need to check all the
>> licence stuff. I have a test app working but no view-related Cairngorm
>> stuff yet.
>>
>>
>>
>>
>>
>> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <
>> gustavodecarli@gmail.com> wrote:
>>
>>> Hi .
>>>
>>> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was
>>> correct, the error does not reproduce anymore (null0).
>>> *Greg*. I tried the library and it worked correctly, I would like to
>>> know the implementation of the ServiceLocator.as how it is done, I made my
>>> own and although it worked, I have problems when I add a jewel tag in the
>>> project, for example a <j: Button>
>>>
>>> Is it possible or correct to have tag mx and jewel in the same project?
>>>
>>> *thanks to you .*
>>>
>>>
>>> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>>> Make sure your app is using the updated compiler. I assume you are
>>>> using Maven to compile the app? Check the pom.xml to make sure it is
>>>> referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version.
>>>> One trick is to add some System.out.println to the file that was changed
>>>> and see if it shows up in the output.
>>>>
>>>>
>>>>
>>>> Regarding the tests, in the pom.xml for some of the projects like
>>>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>>>> which tests/files are run.
>>>>
>>>>
>>>>
>>>> HTH,
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Friday, February 7, 2020 at 3:15 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>> Hi, yesterday I tried with the change of Alex, from the royale-compiler
>>>> without success, the "null0" continues. I don't know if I missed a step.
>>>>
>>>> I rebuilt with the royale-compiler project "mvn clean install" and
>>>> tried again the compilation of my project.
>>>>
>>>> On the other hand I am seeing to create a Test in the project, but I
>>>> see that they are not running the tests of the package "royale-compiler \
>>>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>>>> internal \ codegen \ mxml \ ...", do you know why?
>>>>
>>>>
>>>>
>>>> Thanks.
>>>>
>>>> Gustavo.
>>>>
>>>>
>>>>
>>>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>>>> escribió:
>>>>
>>>>
>>>> I'll try to get an minimal example working over my weekend sometime to
>>>> test what I have. I made a quick start on that, just to get something that
>>>> compiles. Once I see that it seems to be working I will release to git repo
>>>> for the port.
>>>>
>>>> If you do want to try a different swc from what you already have, you
>>>> could try one now from builds here I think:
>>>>
>>>>
>>>>
>>>>
>>>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>>>
>>>>
>>>>
>>>> (I will remove that link in some days once the port is more thoroughly
>>>> tested and available to all)
>>>>
>>>>
>>>>
>>>> I was able to inspect and verify that the js build had a
>>>> ServicesLocator (as defined in that swc) mxml subclass which was populating
>>>> correctly with the recent compiler changes from Alex, but I am not yet able
>>>> to test more thoroughly. The view support probably won't work yet because
>>>> there are no 'added' and 'removed' events, but we will figure something out.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>>>>
>>>>
>>>> Alex, I tested this change today. There is more to it than that, it
>>>> seems. I will discuss details in dev list.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>>>
>>>> royale-compiler
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>> Sorry Alex, what repository is that of the push ?
>>>>
>>>>
>>>>
>>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> I just pushed a change to the compiler. It should now have valid
>>>> output for ServiceLocator.
>>>>
>>>>
>>>>
>>>> The compiler change was interesting in that I changed an else clause
>>>> that was put in to handle instances specified as children of top tags but
>>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>>> that code so none of our tests actually used that code, even though the
>>>> commit log implied it was for one of the tests. Either I made the earlier
>>>> change to propagate the fix for plain properties to instances or there is
>>>> some other scenario for instances as children (without a default property)
>>>> that I am not thinking of.
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we save
>>>> a lot of time in migrations where they use it and leave more time for other
>>>> questions.
>>>>
>>>> i will continue to test how to fill that array today.
>>>>
>>>> Thank you very much for everyone in this collaboration.
>>>>
>>>>
>>>>
>>>> Gustavo.
>>>>
>>>>
>>>>
>>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<
>>>> carlosrovira@apache.org>) escribió:
>>>>
>>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the
>>>> words :)
>>>>
>>>>
>>>>
>>>> I know Cairngorm could be good for people wanting to migrate with the
>>>> less effort possible. Anyway, I recommend, if possible to try to switch to
>>>> Crux. We already did that several years ago in Flex, since all DI, IOC
>>>> stuff, make us be more efficient and increase options. For people creating
>>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>>> the Crux option if they continue evolving the app with new features...
>>>>
>>>>
>>>>
>>>> just my 2 :)
>>>>
>>>>
>>>>
>>>> Carlos
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<
>>>> jl03119@gmail.com>) escribió:
>>>>
>>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>>> Carlos, thanks all the times.^_^
>>>>
>>>>
>>>>
>>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>>
>>>>
>>>>
>>>> Hi Takeshita,
>>>>
>>>>
>>>>
>>>> Yes I think a few people have asked for Cairngorm or expressed interest
>>>> in it. Given the choice, I personally think Crux will be a more
>>>> modern/better option, but like I said, more people are asking for Cairngorm
>>>> now, so probably it makes sense to port that too.
>>>>
>>>>
>>>>
>>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>>> well for you. Please report any issues if you see them.
>>>>
>>>>
>>>>
>>>> One small thing: I definitely understand that you were referring to the
>>>> work I did on porting it to Royale, but just for the sake of anyone else
>>>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>>>> from Swiz, and credit for the awesome features it has rests with the
>>>> original authors of Swiz (I was in contact with the original developer
>>>> during my efforts to port it to Royale).
>>>>
>>>> Also, just so people are aware, Carlos sponsored the majority of my
>>>> work on porting that, so you really have Carlos to thank for that.
>>>>
>>>>
>>>>
>>>> cheers,
>>>>
>>>> Greg
>>>>
>>>>
>>>>
>>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>>> wrote:
>>>>
>>>> Greg,
>>>>
>>>>
>>>>
>>>> Thanks for your work. We already have your Crux framework replacing
>>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>>> plenty of time of emulation work.
>>>>
>>>>
>>>>
>>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>>
>>>>
>>>> There does not appear to be a default property, like an array to put
>>>> the 'children' in. I think it just creates the children as instances and
>>>> makes sure they have id properties on the mxml-generated subclass that the
>>>> instances are assigned to.
>>>>
>>>>
>>>>
>>>> The services are then identified and categorised by iterating the
>>>> accessors of the ServiceLocator subclass via reflection and checking their
>>>> types and then registering them.
>>>>
>>>> Although it is and mxml instance of ServiceLocator, it is also an
>>>> enforced singleton which is accessed elsewhere from code. At least that is
>>>> how it appears to be set up to me.
>>>>
>>>>
>>>>
>>>> I already took a look at the code and have made (not many) local
>>>> changes and have the Cairngorm swc compiling via maven for both js and swf.
>>>> I have not tested it. Things like weak event listeners are gone.
>>>>
>>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>>> ViewHelper automated register/unregister. Maybe we can have a
>>>> CaingormViewBase class with support for these, or perhaps we can use the
>>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>>> be all that is needed, but it may not always work the same.
>>>>
>>>>
>>>>
>>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>>>> permissive (
>>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>>>> It seems to be to be similar to others like MIT etc, but I don't know
>>>> specifically what the rules are for Apache with that licence (in terms of
>>>> possibility to include in Royale itself).
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>>> gustavodecarli@gmail.com> wrote:
>>>>
>>>> Alex :
>>>>
>>>>
>>>> In flex use the swc. I am seeing the same thing that you are
>>>> commenting, I do not understand where it assigns the remote objects to the
>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>> the RemoteObjects class. I will try to assign by code without using the
>>>> mxml to see if it does not generate the error "null0".
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>>> but the cause is that ServiceLocator does not have a default property. Did
>>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>>> mx:RemoteObject?
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>>>> and change.
>>>>
>>>>
>>>>
>>>> import flash.utils.describeType;
>>>>
>>>> --> import org.apache.royale.reflection.describeType;
>>>>
>>>> import flash.utils.Dictionary;
>>>>
>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>
>>>>
>>>>
>>>> And this method
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>>
>>>>
>>>> * Return all the accessors on this object.
>>>>
>>>>
>>>>
>>>> * @param serviceLocator the IServiceLocator instance.
>>>>
>>>>
>>>>
>>>> * @return this object's accessors.
>>>>
>>>>
>>>>
>>>> */
>>>>
>>>>
>>>>
>>>> protected
>>>>
>>>> function getAccessors(
>>>>
>>>> serviceLocator : IServiceLocator ) :
>>>>
>>>> XMLList
>>>>
>>>>
>>>>
>>>> {
>>>>
>>>>
>>>>
>>>> /*
>>>>
>>>>
>>>>
>>>> var description : XML = describeType( serviceLocator );
>>>>
>>>>
>>>>
>>>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>>>> ).@name;
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> return accessors;
>>>>
>>>>
>>>>
>>>> */
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> return describeType( serviceLocator).accessors(@access ==
>>>>
>>>> "readwrite" ).@name;
>>>>
>>>>
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>> not easy, or requires some expertise.
>>>>
>>>> You can use Crux instead that has support for Cairngorm style Commands.
>>>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>>>> Royale, and supports much more like dependency injection, Inversion of
>>>> control, event handling, ...
>>>>
>>>> You have 3 examples in the examples/crux folder you can check.
>>>>
>>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>>> Cairngorm
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>> gustavodecarli@gmail.com>) escribió:
>>>>
>>>> Alex
>>>>
>>>>
>>>>
>>>> <version>0.9.7-SNAPSHOT</version>
>>>>
>>>>
>>>>
>>>> Thank
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> What version of the compiler are you using?
>>>>
>>>>
>>>>
>>>> What does the ServiceLocator source look like? It might be an issue
>>>> with defaultProperties for non-DOM objects.
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>>>> the construction of the ServiceLocator, I understand that it is an error of
>>>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>
>>>> Thank
>>>>
>>>> Gustavo.
>>>>
>>>>
>>>>
>>>> *1. CODE *
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>
>>>>
>>>>
>>>> <cairngorm:ServiceLocator
>>>>
>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>>>> "
>>>>
>>>>
>>>>
>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>>>> "
>>>>
>>>>
>>>>
>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <mx:RemoteObject
>>>>
>>>> id="srvSeguridades"
>>>>
>>>>
>>>>
>>>> destination="seguridades"
>>>>
>>>>
>>>>
>>>> result="event.token.resultHandler(event)"
>>>>
>>>>
>>>>
>>>> fault="event.token.faultHandler(event)"
>>>>
>>>>
>>>>
>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> </cairngorm:ServiceLocator>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *2. LINE OF ERROR (RED)*
>>>>
>>>> /
>>>>
>>>>
>>>>
>>>> **
>>>> * @constructor
>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>> */
>>>> services.Servicio = function() {
>>>> services.Servicio.base(this, 'constructor');
>>>>
>>>> /**
>>>> * @private
>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>> */
>>>> this.srvSeguridades_;
>>>>
>>>> /**
>>>> * @private
>>>> * @type {Array}
>>>> */
>>>> this.mxmldd;
>>>>
>>>> /**
>>>> * @private
>>>> * @type {Array}
>>>> */
>>>> this.mxmldp;
>>>>
>>>> this.generateMXMLAttributes
>>>> ([1,
>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>> 3,
>>>> 'id',
>>>> true,
>>>> 'srvSeguridades',
>>>> 'destination',
>>>> true,
>>>> 'seguridades',
>>>> 'endpoint',
>>>> true,
>>>> 'http://localhost:8080/messagebroker/amf',
>>>> 0,
>>>> 2,
>>>> 'result',
>>>> this.$EH0,
>>>> 'fault',
>>>> this.$EH1,
>>>> null0, <- ERROR
>>>> 0
>>>> ]);
>>>>
>>>> };
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 3. Trace console log
>>>>
>>>>
>>>>
>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>> at new services.Servicio (Servicio.js:61)
>>>> at
>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>> (MXMLDataInterpreter.js:126)
>>>> at
>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>> (MXMLDataInterpreter.js:271)
>>>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>> at
>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>> (UIBase.js:402)
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Carlos Rovira
>>>>
>>>> http://about.me/carlosrovira
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Shoichiro Takeshita
>>>> 武下 祥一郎
>>>>
>>>> --
>>>>
>>>> Shoichiro Takeshita
>>>> 武下 祥一郎
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Carlos Rovira
>>>>
>>>> http://about.me/carlosrovira
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>>>
>>>>
>>>>
>>>>
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
"I will try to make the full source of what I have available for Cairngorm
port in about 24 hours time from this email. I need to check all the
licence stuff. "
Sorry, I did not get to the above yet as I had hoped, but I will find time
tomorrow local time. It turns out that I might need to use this myself for
a client.
On Sun, Feb 9, 2020 at 7:30 PM Greg Dove <gr...@gmail.com> wrote:
>
> There is a css clash between Jewel and MXRoyale, and there might be more
> issues at the child element level with different required base classes etc,
> but I am not sure because I did not try that. Alex will undoubtedly explain
> better than me.
> I am pretty sure you cannot use MXRoyale visual components combined with
> Jewel in the same project. But you do need the service related classes from
> MXRoyale for Cairngorm.
>
> I am testing Cairngorm using 'Express', but if you want to use Jewel (e.g.
> always <j:Button or <j:SomethingElse and never <mx:Something), the
> following should work so that you can still use the service classes from MX
> (which Cairngorm has hard dependencies for).
>
> Below is what I am doing... you need to add the third option of the
> following in maven:
> <additionalCompilerOptions>
> -js-default-initializers=true;
> -source-map=true;
>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
> </additionalCompilerOptions>
>
> The first 2 above are options I use during development - you may or may
> not want those.
>
> I will try to make the full source of what I have available for Cairngorm
> port in about 24 hours time from this email. I need to check all the
> licence stuff. I have a test app working but no view-related Cairngorm
> stuff yet.
>
>
>
>
>
> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
>> Hi .
>>
>> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was
>> correct, the error does not reproduce anymore (null0).
>> *Greg*. I tried the library and it worked correctly, I would like to
>> know the implementation of the ServiceLocator.as how it is done, I made my
>> own and although it worked, I have problems when I add a jewel tag in the
>> project, for example a <j: Button>
>>
>> Is it possible or correct to have tag mx and jewel in the same project?
>>
>> *thanks to you .*
>>
>>
>> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>>> Make sure your app is using the updated compiler. I assume you are
>>> using Maven to compile the app? Check the pom.xml to make sure it is
>>> referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version.
>>> One trick is to add some System.out.println to the file that was changed
>>> and see if it shows up in the output.
>>>
>>>
>>>
>>> Regarding the tests, in the pom.xml for some of the projects like
>>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>>> which tests/files are run.
>>>
>>>
>>>
>>> HTH,
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Friday, February 7, 2020 at 3:15 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>> Hi, yesterday I tried with the change of Alex, from the royale-compiler
>>> without success, the "null0" continues. I don't know if I missed a step.
>>>
>>> I rebuilt with the royale-compiler project "mvn clean install" and tried
>>> again the compilation of my project.
>>>
>>> On the other hand I am seeing to create a Test in the project, but I see
>>> that they are not running the tests of the package "royale-compiler \
>>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>>> internal \ codegen \ mxml \ ...", do you know why?
>>>
>>>
>>>
>>> Thanks.
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>>> escribió:
>>>
>>>
>>> I'll try to get an minimal example working over my weekend sometime to
>>> test what I have. I made a quick start on that, just to get something that
>>> compiles. Once I see that it seems to be working I will release to git repo
>>> for the port.
>>>
>>> If you do want to try a different swc from what you already have, you
>>> could try one now from builds here I think:
>>>
>>>
>>>
>>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>>
>>>
>>>
>>> (I will remove that link in some days once the port is more thoroughly
>>> tested and available to all)
>>>
>>>
>>>
>>> I was able to inspect and verify that the js build had a ServicesLocator
>>> (as defined in that swc) mxml subclass which was populating correctly with
>>> the recent compiler changes from Alex, but I am not yet able to test more
>>> thoroughly. The view support probably won't work yet because there are no
>>> 'added' and 'removed' events, but we will figure something out.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>>>
>>>
>>> Alex, I tested this change today. There is more to it than that, it
>>> seems. I will discuss details in dev list.
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>>
>>> royale-compiler
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>> Sorry Alex, what repository is that of the push ?
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> I just pushed a change to the compiler. It should now have valid output
>>> for ServiceLocator.
>>>
>>>
>>>
>>> The compiler change was interesting in that I changed an else clause
>>> that was put in to handle instances specified as children of top tags but
>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>> that code so none of our tests actually used that code, even though the
>>> commit log implied it was for one of the tests. Either I made the earlier
>>> change to propagate the fix for plain properties to instances or there is
>>> some other scenario for instances as children (without a default property)
>>> that I am not thinking of.
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we save
>>> a lot of time in migrations where they use it and leave more time for other
>>> questions.
>>>
>>> i will continue to test how to fill that array today.
>>>
>>> Thank you very much for everyone in this collaboration.
>>>
>>>
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
>>> escribió:
>>>
>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
>>> :)
>>>
>>>
>>>
>>> I know Cairngorm could be good for people wanting to migrate with the
>>> less effort possible. Anyway, I recommend, if possible to try to switch to
>>> Crux. We already did that several years ago in Flex, since all DI, IOC
>>> stuff, make us be more efficient and increase options. For people creating
>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>> the Crux option if they continue evolving the app with new features...
>>>
>>>
>>>
>>> just my 2 :)
>>>
>>>
>>>
>>> Carlos
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
>>> escribió:
>>>
>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>> Carlos, thanks all the times.^_^
>>>
>>>
>>>
>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>
>>>
>>>
>>> Hi Takeshita,
>>>
>>>
>>>
>>> Yes I think a few people have asked for Cairngorm or expressed interest
>>> in it. Given the choice, I personally think Crux will be a more
>>> modern/better option, but like I said, more people are asking for Cairngorm
>>> now, so probably it makes sense to port that too.
>>>
>>>
>>>
>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>> well for you. Please report any issues if you see them.
>>>
>>>
>>>
>>> One small thing: I definitely understand that you were referring to the
>>> work I did on porting it to Royale, but just for the sake of anyone else
>>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>>> from Swiz, and credit for the awesome features it has rests with the
>>> original authors of Swiz (I was in contact with the original developer
>>> during my efforts to port it to Royale).
>>>
>>> Also, just so people are aware, Carlos sponsored the majority of my work
>>> on porting that, so you really have Carlos to thank for that.
>>>
>>>
>>>
>>> cheers,
>>>
>>> Greg
>>>
>>>
>>>
>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>> wrote:
>>>
>>> Greg,
>>>
>>>
>>>
>>> Thanks for your work. We already have your Crux framework replacing
>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>> plenty of time of emulation work.
>>>
>>>
>>>
>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>
>>>
>>> There does not appear to be a default property, like an array to put the
>>> 'children' in. I think it just creates the children as instances and makes
>>> sure they have id properties on the mxml-generated subclass that the
>>> instances are assigned to.
>>>
>>>
>>>
>>> The services are then identified and categorised by iterating the
>>> accessors of the ServiceLocator subclass via reflection and checking their
>>> types and then registering them.
>>>
>>> Although it is and mxml instance of ServiceLocator, it is also an
>>> enforced singleton which is accessed elsewhere from code. At least that is
>>> how it appears to be set up to me.
>>>
>>>
>>>
>>> I already took a look at the code and have made (not many) local changes
>>> and have the Cairngorm swc compiling via maven for both js and swf. I have
>>> not tested it. Things like weak event listeners are gone.
>>>
>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>> ViewHelper automated register/unregister. Maybe we can have a
>>> CaingormViewBase class with support for these, or perhaps we can use the
>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>> be all that is needed, but it may not always work the same.
>>>
>>>
>>>
>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>>> permissive (
>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>>> It seems to be to be similar to others like MIT etc, but I don't know
>>> specifically what the rules are for Apache with that licence (in terms of
>>> possibility to include in Royale itself).
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>> gustavodecarli@gmail.com> wrote:
>>>
>>> Alex :
>>>
>>>
>>> In flex use the swc. I am seeing the same thing that you are commenting,
>>> I do not understand where it assigns the remote objects to the
>>> ServiceLocator. This would have to be added to the "services" attribute of
>>> the RemoteObjects class. I will try to assign by code without using the
>>> mxml to see if it does not generate the error "null0".
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>> but the cause is that ServiceLocator does not have a default property. Did
>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>> mx:RemoteObject?
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>>> and change.
>>>
>>>
>>>
>>> import flash.utils.describeType;
>>>
>>> --> import org.apache.royale.reflection.describeType;
>>>
>>> import flash.utils.Dictionary;
>>>
>>> --> import org.apache.royale.utils.ObjectMap;
>>>
>>>
>>>
>>> And this method
>>>
>>>
>>>
>>>
>>>
>>> /**
>>>
>>>
>>>
>>> * Return all the accessors on this object.
>>>
>>>
>>>
>>> * @param serviceLocator the IServiceLocator instance.
>>>
>>>
>>>
>>> * @return this object's accessors.
>>>
>>>
>>>
>>> */
>>>
>>>
>>>
>>> protected
>>>
>>> function getAccessors(
>>>
>>> serviceLocator : IServiceLocator ) :
>>>
>>> XMLList
>>>
>>>
>>>
>>> {
>>>
>>>
>>>
>>> /*
>>>
>>>
>>>
>>> var description : XML = describeType( serviceLocator );
>>>
>>>
>>>
>>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>>> ).@name;
>>>
>>>
>>>
>>>
>>>
>>> return accessors;
>>>
>>>
>>>
>>> */
>>>
>>>
>>>
>>>
>>>
>>> return describeType( serviceLocator).accessors(@access ==
>>>
>>> "readwrite" ).@name;
>>>
>>>
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *Carlos Rovira <ca...@apache.org>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>>> easy, or requires some expertise.
>>>
>>> You can use Crux instead that has support for Cairngorm style Commands.
>>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>>> Royale, and supports much more like dependency injection, Inversion of
>>> control, event handling, ...
>>>
>>> You have 3 examples in the examples/crux folder you can check.
>>>
>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>> Cairngorm
>>>
>>>
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>> gustavodecarli@gmail.com>) escribió:
>>>
>>> Alex
>>>
>>>
>>>
>>> <version>0.9.7-SNAPSHOT</version>
>>>
>>>
>>>
>>> Thank
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> What version of the compiler are you using?
>>>
>>>
>>>
>>> What does the ServiceLocator source look like? It might be an issue
>>> with defaultProperties for non-DOM objects.
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>>
>>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>>> the construction of the ServiceLocator, I understand that it is an error of
>>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>
>>> Thank
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> *1. CODE *
>>>
>>>
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>>
>>>
>>>
>>> <cairngorm:ServiceLocator
>>>
>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:mx="library://ns.apache.org/royale/mx
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>
>>>
>>>
>>>
>>>
>>> <mx:RemoteObject
>>>
>>> id="srvSeguridades"
>>>
>>>
>>>
>>> destination="seguridades"
>>>
>>>
>>>
>>> result="event.token.resultHandler(event)"
>>>
>>>
>>>
>>> fault="event.token.faultHandler(event)"
>>>
>>>
>>>
>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>
>>>
>>>
>>>
>>>
>>> </cairngorm:ServiceLocator>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *2. LINE OF ERROR (RED)*
>>>
>>> /
>>>
>>>
>>>
>>> **
>>> * @constructor
>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>> */
>>> services.Servicio = function() {
>>> services.Servicio.base(this, 'constructor');
>>>
>>> /**
>>> * @private
>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>> */
>>> this.srvSeguridades_;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldd;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldp;
>>>
>>> this.generateMXMLAttributes
>>> ([1,
>>> mx.rpc.remoting.mxml.RemoteObject,
>>> 3,
>>> 'id',
>>> true,
>>> 'srvSeguridades',
>>> 'destination',
>>> true,
>>> 'seguridades',
>>> 'endpoint',
>>> true,
>>> 'http://localhost:8080/messagebroker/amf',
>>> 0,
>>> 2,
>>> 'result',
>>> this.$EH0,
>>> 'fault',
>>> this.$EH1,
>>> null0, <- ERROR
>>> 0
>>> ]);
>>>
>>> };
>>>
>>>
>>>
>>>
>>>
>>> 3. Trace console log
>>>
>>>
>>>
>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>> at new services.Servicio (Servicio.js:61)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>> (MXMLDataInterpreter.js:126)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>> (MXMLDataInterpreter.js:271)
>>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>> at
>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>> (UIBase.js:402)
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Carlos Rovira
>>>
>>> http://about.me/carlosrovira
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>>
>>>
>>>
>>> --
>>>
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>>
>>> --
>>>
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Carlos Rovira
>>>
>>> http://about.me/carlosrovira
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>>
>>>
>>>
>>>
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
Does anybody know of an explicit example of a CSS conflict between MX and
Jewel?
I can't recall details offhand.
But CruxGitHubCommitLogViewer is an Express project, and it has at least a
little bit of mayhem if you don't avoid that. The Crux service call stuff
seems to run but the visuals are not processed I think because of startup
errors, which includes renderer mappings/Factories from MXRoyale I think.
I just tried removing:
'-compiler.exclude-defaults-css-files=MXRoyale-${royale.framework.version}-js.swc:defaults.css;'
to get the errors.
I assume you could see the same thing in ant if you preferred to use ant,
by removing the <exclude-defaults-css-files> tag from the local
compile-app-config.xml
That's not Jewel (I know it!). Maybe Carlos can provide more detail for
Jewel.
On Mon, Feb 10, 2020 at 5:46 PM Alex Harui <ah...@adobe.com> wrote:
> Does anybody know of an explicit example of a CSS conflict between MX and
> Jewel?
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Sunday, February 9, 2020 at 7:32 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Hi,
>
>
>
> as Greg pointed combine different UI Sets can work at logic level, but can
> generate unwanted visual results due to CSS problems. So you need to use
> the "compiler.exclude-defaults-css-files", but this means that you have
> Jewel or MX CSS.
>
>
>
> This is recommended when you use non-ui visual classes like RemoteObject,
> AMF, HTTPService, Validators , etc...
>
>
>
> There's a plan to separate MXRoyale UI Set (MX) from non-visual classes,
> as we have the time, so you can just add that dependency to you project if
> you use other UI Set (MDL, Jewel, Basic,...)
>
>
>
> At funcional level, Jewel should have the same UI options than MX and
> probably more, since has new components like Drawe, TobBar, Badges or PopUp
> to name just a few. Others are in the works, soon Tree,... and if you thing
> something is missing, talk so we can know there's a concrete need.
>
>
>
> Thanks
>
>
>
> Carlos
>
>
>
>
>
> El dom., 9 feb. 2020 a las 7:30, Greg Dove (<gr...@gmail.com>)
> escribió:
>
>
> There is a css clash between Jewel and MXRoyale, and there might be more
> issues at the child element level with different required base classes etc,
> but I am not sure because I did not try that. Alex will undoubtedly explain
> better than me.
>
> I am pretty sure you cannot use MXRoyale visual components combined with
> Jewel in the same project. But you do need the service related classes from
> MXRoyale for Cairngorm.
>
>
>
> I am testing Cairngorm using 'Express', but if you want to use Jewel (e.g.
> always <j:Button or <j:SomethingElse and never <mx:Something), the
> following should work so that you can still use the service classes from MX
> (which Cairngorm has hard dependencies for).
>
>
>
> Below is what I am doing... you need to add the third option of the
> following in maven:
>
> <additionalCompilerOptions>
> -js-default-initializers=true;
> -source-map=true;
>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
> </additionalCompilerOptions>
>
>
>
> The first 2 above are options I use during development - you may or may
> not want those.
>
>
>
> I will try to make the full source of what I have available for Cairngorm
> port in about 24 hours time from this email. I need to check all the
> licence stuff. I have a test app working but no view-related Cairngorm
> stuff yet.
>
>
>
>
>
>
>
>
>
>
>
> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
> Hi .
>
>
>
> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was correct,
> the error does not reproduce anymore (null0).
>
> *Greg*. I tried the library and it worked correctly, I would like to know
> the implementation of the ServiceLocator.as how it is done, I made my own
> and although it worked, I have problems when I add a jewel tag in the
> project, for example a <j: Button>
>
>
>
> Is it possible or correct to have tag mx and jewel in the same project?
>
>
>
> *thanks to you .*
>
>
>
> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> Make sure your app is using the updated compiler. I assume you are using
> Maven to compile the app? Check the pom.xml to make sure it is referencing
> the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version. One trick is
> to add some System.out.println to the file that was changed and see if it
> shows up in the output.
>
>
>
> Regarding the tests, in the pom.xml for some of the projects like
> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
> which tests/files are run.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, February 7, 2020 at 3:15 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
> Hi, yesterday I tried with the change of Alex, from the royale-compiler
> without success, the "null0" continues. I don't know if I missed a step.
>
> I rebuilt with the royale-compiler project "mvn clean install" and tried
> again the compilation of my project.
>
> On the other hand I am seeing to create a Test in the project, but I see
> that they are not running the tests of the package "royale-compiler \
> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
> internal \ codegen \ mxml \ ...", do you know why?
>
>
>
> Thanks.
>
> Gustavo.
>
>
>
> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
> escribió:
>
>
> I'll try to get an minimal example working over my weekend sometime to
> test what I have. I made a quick start on that, just to get something that
> compiles. Once I see that it seems to be working I will release to git repo
> for the port.
>
> If you do want to try a different swc from what you already have, you
> could try one now from builds here I think:
>
>
>
> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530661727&sdata=D3ikBs2U%2BBgfo6Pv2MamgBv3OT4bmgvLvpWOb4SLho0%3D&reserved=0>
>
>
>
> (I will remove that link in some days once the port is more thoroughly
> tested and available to all)
>
>
>
> I was able to inspect and verify that the js build had a ServicesLocator
> (as defined in that swc) mxml subclass which was populating correctly with
> the recent compiler changes from Alex, but I am not yet able to test more
> thoroughly. The view support probably won't work yet because there are no
> 'added' and 'removed' events, but we will figure something out.
>
>
>
>
>
>
>
>
>
> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>
>
> Alex, I tested this change today. There is more to it than that, it seems.
> I will discuss details in dev list.
>
>
>
>
>
> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>
> royale-compiler
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, February 6, 2020 at 11:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Sorry Alex, what repository is that of the push ?
>
>
>
> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> I just pushed a change to the compiler. It should now have valid output
> for ServiceLocator.
>
>
>
> The compiler change was interesting in that I changed an else clause that
> was put in to handle instances specified as children of top tags but was
> doing the wrong thing. All of the compiler tests passed, but never hit
> that code so none of our tests actually used that code, even though the
> commit log implied it was for one of the tests. Either I made the earlier
> change to propagate the fix for plain properties to instances or there is
> some other scenario for instances as children (without a default property)
> that I am not thinking of.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, February 6, 2020 at 6:03 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
> Exactly, cairmgorm, as Carlos says, is not the best option, but we save a
> lot of time in migrations where they use it and leave more time for other
> questions.
>
> i will continue to test how to fill that array today.
>
> Thank you very much for everyone in this collaboration.
>
>
>
> Gustavo.
>
>
>
> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
> :)
>
>
>
> I know Cairngorm could be good for people wanting to migrate with the less
> effort possible. Anyway, I recommend, if possible to try to switch to Crux.
> We already did that several years ago in Flex, since all DI, IOC stuff,
> make us be more efficient and increase options. For people creating new
> apps, for me there's no doubt, for people migrating, should contemplate the
> Crux option if they continue evolving the app with new features...
>
>
>
> just my 2 :)
>
>
>
> Carlos
>
>
>
>
>
>
>
> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
> escribió:
>
> Greg, thanks for your clarification. Anyway, it is a great work.
> Carlos, thanks all the times.^_^
>
>
>
> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>
>
>
> Hi Takeshita,
>
>
>
> Yes I think a few people have asked for Cairngorm or expressed interest in
> it. Given the choice, I personally think Crux will be a more modern/better
> option, but like I said, more people are asking for Cairngorm now, so
> probably it makes sense to port that too.
>
>
>
> I'm also pleased to hear that you are using Crux, I hope it's working well
> for you. Please report any issues if you see them.
>
>
>
> One small thing: I definitely understand that you were referring to the
> work I did on porting it to Royale, but just for the sake of anyone else
> who reads this: it's definitely not 'my Crux framework'. The code is ported
> from Swiz, and credit for the awesome features it has rests with the
> original authors of Swiz (I was in contact with the original developer
> during my efforts to port it to Royale).
>
> Also, just so people are aware, Carlos sponsored the majority of my work
> on porting that, so you really have Carlos to thank for that.
>
>
>
> cheers,
>
> Greg
>
>
>
> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
> wrote:
>
> Greg,
>
>
>
> Thanks for your work. We already have your Crux framework replacing
> Cairngorm, it is great if Cairngorm works with Royale. It will save a
> plenty of time of emulation work.
>
>
>
> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>
>
> There does not appear to be a default property, like an array to put the
> 'children' in. I think it just creates the children as instances and makes
> sure they have id properties on the mxml-generated subclass that the
> instances are assigned to.
>
>
>
> The services are then identified and categorised by iterating the
> accessors of the ServiceLocator subclass via reflection and checking their
> types and then registering them.
>
> Although it is and mxml instance of ServiceLocator, it is also an enforced
> singleton which is accessed elsewhere from code. At least that is how it
> appears to be set up to me.
>
>
>
> I already took a look at the code and have made (not many) local changes
> and have the Cairngorm swc compiling via maven for both js and swf. I have
> not tested it. Things like weak event listeners are gone.
>
> The main issue I think will be the Event.ADDED and Event.REMOVED for
> ViewHelper automated register/unregister. Maybe we can have a
> CaingormViewBase class with support for these, or perhaps we can use the
> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
> be all that is needed, but it may not always work the same.
>
>
>
> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
> permissive (
> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530671686&sdata=DHBc7NgQk3k%2BtrO4ra6I2vbY5f7wxUtN3ParR8Ij%2FoE%3D&reserved=0>) -
> It seems to be to be similar to others like MIT etc, but I don't know
> specifically what the rules are for Apache with that licence (in terms of
> possibility to include in Royale itself).
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
> Alex :
>
>
> In flex use the swc. I am seeing the same thing that you are commenting, I
> do not understand where it assigns the remote objects to the
> ServiceLocator. This would have to be added to the "services" attribute of
> the RemoteObjects class. I will try to assign by code without using the
> mxml to see if it does not generate the error "null0".
>
>
>
> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> I grabbed ServiceLocator.as and was able to produce the null0 problem, but
> the cause is that ServiceLocator does not have a default property. Did
> your MXML work in Flex? What ServiceLocator property would be assigned the
> mx:RemoteObject?
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 12:00 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
>
> I download https://sourceforge.net/adobe/cairngorm/code/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530671686&sdata=z8X3SWlYOm4aq1VGTBvG0ExGaOQGx9KJkXn8yjJblug%3D&reserved=0>,
> and change.
>
>
>
> import flash.utils.describeType;
>
> --> import org.apache.royale.reflection.describeType;
>
> import flash.utils.Dictionary;
>
> --> import org.apache.royale.utils.ObjectMap;
>
>
>
> And this method
>
>
>
>
>
> /**
>
>
>
> * Return all the accessors on this object.
>
>
>
> * @param serviceLocator the IServiceLocator instance.
>
>
>
> * @return this object's accessors.
>
>
>
> */
>
>
>
> protected
>
> function getAccessors(
>
> serviceLocator : IServiceLocator ) :
>
> XMLList
>
>
>
> {
>
>
>
> /*
>
>
>
> var description : XML = describeType( serviceLocator );
>
>
>
> var accessors : XMLList = description.accessor.( @access == "readwrite"
> ).@name;
>
>
>
>
>
> return accessors;
>
>
>
> */
>
>
>
>
>
> return describeType( serviceLocator).accessors(@access ==
>
> "readwrite" ).@name;
>
>
>
> }
>
>
>
>
>
>
>
>
>
> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> Carlos, What Flash APIs is Cairngorm dependent on?
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Hi,
>
>
>
> Cairngorm depends on Flash APIs, so make a Royale migration could be not
> easy, or requires some expertise.
>
> You can use Crux instead that has support for Cairngorm style Commands.
> Crux is the same as Swiz Framework for Flex but rewritten to work in
> Royale, and supports much more like dependency injection, Inversion of
> control, event handling, ...
>
> You have 3 examples in the examples/crux folder you can check.
>
> I recommend you Crux over Cairngorm since Swiz was born to substitute
> Cairngorm
>
>
>
>
>
> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
> gustavodecarli@gmail.com>) escribió:
>
> Alex
>
>
>
> <version>0.9.7-SNAPSHOT</version>
>
>
>
> Thank
>
>
>
> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> What version of the compiler are you using?
>
>
>
> What does the ServiceLocator source look like? It might be an issue with
> defaultProperties for non-DOM objects.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 7:35 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Cairngorm problem add remote object MXML.
>
>
>
>
>
>
> I am trying to transcribe gairngorm, at runtime it gives me an error in
> the construction of the ServiceLocator, I understand that it is an error of
> the MXMLDataInterpreter. Anyone have any idea of the problem.
>
> Thank
>
> Gustavo.
>
>
>
> *1. CODE *
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <cairngorm:ServiceLocator
>
> xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530671686&sdata=91UZGR1Bf1BEfiYNOvDTzRKpsf%2Bul9eRz7AoFl8QFok%3D&reserved=0>
> "
>
>
>
> xmlns:mx="library://ns.apache.org/royale/mx
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530681640&sdata=5Ggy0LDajLn%2FCCoC8NIYJQCqcaO7v3AddRaI4jhq6AU%3D&reserved=0>
> "
>
>
>
> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>
>
>
>
>
> <mx:RemoteObject
>
> id="srvSeguridades"
>
>
>
> destination="seguridades"
>
>
>
> result="event.token.resultHandler(event)"
>
>
>
> fault="event.token.faultHandler(event)"
>
>
>
> endpoint="http://localhost:8080/messagebroker/amf"/>
>
>
>
>
>
> </cairngorm:ServiceLocator>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *2. LINE OF ERROR (RED)*
>
> /
>
>
>
> **
> * @constructor
> * @extends {com.adobe.cairngorm.business.ServiceLocator}
> */
> services.Servicio = function() {
> services.Servicio.base(this, 'constructor');
>
> /**
> * @private
> * @type {mx.rpc.remoting.mxml.RemoteObject}
> */
> this.srvSeguridades_;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldd;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldp;
>
> this.generateMXMLAttributes
> ([1,
> mx.rpc.remoting.mxml.RemoteObject,
> 3,
> 'id',
> true,
> 'srvSeguridades',
> 'destination',
> true,
> 'seguridades',
> 'endpoint',
> true,
> 'http://localhost:8080/messagebroker/amf',
> 0,
> 2,
> 'result',
> this.$EH0,
> 'fault',
> this.$EH1,
> null0, <- ERROR
> 0
> ]);
>
> };
>
>
>
>
>
> 3. Trace console log
>
>
>
> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
> at new services.Servicio (Servicio.js:61)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
> (MXMLDataInterpreter.js:126)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
> (MXMLDataInterpreter.js:271)
> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
> at main.Main.mx.core.Container.createChildren (Container.js:136)
> at main.Main.mx.core.Application.createChildren (Application.js:122)
> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
> at main.Main.mx.core.Container.addedToParent (Container.js:123)
> at
> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
> (UIBase.js:402)
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530681640&sdata=hL3StxA4iJ%2BIO8Ol6x7LXKFYFKe7GeLDJgtti%2B5DRnk%3D&reserved=0>
>
>
>
> --
>
> Shoichiro Takeshita
> 武下 祥一郎
>
> --
>
> Shoichiro Takeshita
> 武下 祥一郎
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530691596&sdata=0HD2ilJNwK6afrK2VNMbWQ91TrKtzJ1%2BUBox0%2BolKfE%3D&reserved=0>
>
>
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530691596&sdata=0HD2ilJNwK6afrK2VNMbWQ91TrKtzJ1%2BUBox0%2BolKfE%3D&reserved=0>
>
>
>
Re: Cairngorm problem add remote object MXML.
Posted by Alex Harui <ah...@adobe.com>.
Does anybody know of an explicit example of a CSS conflict between MX and Jewel?
-Alex
From: Carlos Rovira <ca...@apache.org>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Sunday, February 9, 2020 at 7:32 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Cairngorm problem add remote object MXML.
Hi,
as Greg pointed combine different UI Sets can work at logic level, but can generate unwanted visual results due to CSS problems. So you need to use the "compiler.exclude-defaults-css-files", but this means that you have Jewel or MX CSS.
This is recommended when you use non-ui visual classes like RemoteObject, AMF, HTTPService, Validators , etc...
There's a plan to separate MXRoyale UI Set (MX) from non-visual classes, as we have the time, so you can just add that dependency to you project if you use other UI Set (MDL, Jewel, Basic,...)
At funcional level, Jewel should have the same UI options than MX and probably more, since has new components like Drawe, TobBar, Badges or PopUp to name just a few. Others are in the works, soon Tree,... and if you thing something is missing, talk so we can know there's a concrete need.
Thanks
Carlos
El dom., 9 feb. 2020 a las 7:30, Greg Dove (<gr...@gmail.com>>) escribió:
There is a css clash between Jewel and MXRoyale, and there might be more issues at the child element level with different required base classes etc, but I am not sure because I did not try that. Alex will undoubtedly explain better than me.
I am pretty sure you cannot use MXRoyale visual components combined with Jewel in the same project. But you do need the service related classes from MXRoyale for Cairngorm.
I am testing Cairngorm using 'Express', but if you want to use Jewel (e.g. always <j:Button or <j:SomethingElse and never <mx:Something), the following should work so that you can still use the service classes from MX (which Cairngorm has hard dependencies for).
Below is what I am doing... you need to add the third option of the following in maven:
<additionalCompilerOptions>
-js-default-initializers=true;
-source-map=true;
-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
</additionalCompilerOptions>
The first 2 above are options I use during development - you may or may not want those.
I will try to make the full source of what I have available for Cairngorm port in about 24 hours time from this email. I need to check all the licence stuff. I have a test app working but no view-related Cairngorm stuff yet.
On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <gu...@gmail.com>> wrote:
Hi .
Alex : 0.9.7-snapshot royale-compiler - you're right, this was correct, the error does not reproduce anymore (null0).
Greg. I tried the library and it worked correctly, I would like to know the implementation of the ServiceLocator.as how it is done, I made my own and although it worked, I have problems when I add a jewel tag in the project, for example a <j: Button>
Is it possible or correct to have tag mx and jewel in the same project?
thanks to you .
El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>>) escribió:
Make sure your app is using the updated compiler. I assume you are using Maven to compile the app? Check the pom.xml to make sure it is referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version. One trick is to add some System.out.println to the file that was changed and see if it shows up in the output.
Regarding the tests, in the pom.xml for some of the projects like compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate which tests/files are run.
HTH,
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Friday, February 7, 2020 at 3:15 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Hi, yesterday I tried with the change of Alex, from the royale-compiler without success, the "null0" continues. I don't know if I missed a step.
I rebuilt with the royale-compiler project "mvn clean install" and tried again the compilation of my project.
On the other hand I am seeing to create a Test in the project, but I see that they are not running the tests of the package "royale-compiler \ compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \ internal \ codegen \ mxml \ ...", do you know why?
Thanks.
Gustavo.
El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>>) escribió:
I'll try to get an minimal example working over my weekend sometime to test what I have. I made a quick start on that, just to get something that compiles. Once I see that it seems to be working I will release to git repo for the port.
If you do want to try a different swc from what you already have, you could try one now from builds here I think:
https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530661727&sdata=D3ikBs2U%2BBgfo6Pv2MamgBv3OT4bmgvLvpWOb4SLho0%3D&reserved=0>
(I will remove that link in some days once the port is more thoroughly tested and available to all)
I was able to inspect and verify that the js build had a ServicesLocator (as defined in that swc) mxml subclass which was populating correctly with the recent compiler changes from Alex, but I am not yet able to test more thoroughly. The view support probably won't work yet because there are no 'added' and 'removed' events, but we will figure something out.
On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com>> wrote:
Alex, I tested this change today. There is more to it than that, it seems. I will discuss details in dev list.
On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com>> wrote:
royale-compiler
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, February 6, 2020 at 11:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Sorry Alex, what repository is that of the push ?
El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>>) escribió:
I just pushed a change to the compiler. It should now have valid output for ServiceLocator.
The compiler change was interesting in that I changed an else clause that was put in to handle instances specified as children of top tags but was doing the wrong thing. All of the compiler tests passed, but never hit that code so none of our tests actually used that code, even though the commit log implied it was for one of the tests. Either I made the earlier change to propagate the fix for plain properties to instances or there is some other scenario for instances as children (without a default property) that I am not thinking of.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, February 6, 2020 at 6:03 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Exactly, cairmgorm, as Carlos says, is not the best option, but we save a lot of time in migrations where they use it and leave more time for other questions.
i will continue to test how to fill that array today.
Thank you very much for everyone in this collaboration.
Gustavo.
El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>>) escribió:
Thanks Greg, for the sponsor credits, and thanks Takeshita for the words :)
I know Cairngorm could be good for people wanting to migrate with the less effort possible. Anyway, I recommend, if possible to try to switch to Crux. We already did that several years ago in Flex, since all DI, IOC stuff, make us be more efficient and increase options. For people creating new apps, for me there's no doubt, for people migrating, should contemplate the Crux option if they continue evolving the app with new features...
just my 2 :)
Carlos
El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>>) escribió:
Greg, thanks for your clarification. Anyway, it is a great work. Carlos, thanks all the times.^_^
2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>>:
Hi Takeshita,
Yes I think a few people have asked for Cairngorm or expressed interest in it. Given the choice, I personally think Crux will be a more modern/better option, but like I said, more people are asking for Cairngorm now, so probably it makes sense to port that too.
I'm also pleased to hear that you are using Crux, I hope it's working well for you. Please report any issues if you see them.
One small thing: I definitely understand that you were referring to the work I did on porting it to Royale, but just for the sake of anyone else who reads this: it's definitely not 'my Crux framework'. The code is ported from Swiz, and credit for the awesome features it has rests with the original authors of Swiz (I was in contact with the original developer during my efforts to port it to Royale).
Also, just so people are aware, Carlos sponsored the majority of my work on porting that, so you really have Carlos to thank for that.
cheers,
Greg
On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>> wrote:
Greg,
Thanks for your work. We already have your Crux framework replacing Cairngorm, it is great if Cairngorm works with Royale. It will save a plenty of time of emulation work.
2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>>:
There does not appear to be a default property, like an array to put the 'children' in. I think it just creates the children as instances and makes sure they have id properties on the mxml-generated subclass that the instances are assigned to.
The services are then identified and categorised by iterating the accessors of the ServiceLocator subclass via reflection and checking their types and then registering them.
Although it is and mxml instance of ServiceLocator, it is also an enforced singleton which is accessed elsewhere from code. At least that is how it appears to be set up to me.
I already took a look at the code and have made (not many) local changes and have the Cairngorm swc compiling via maven for both js and swf. I have not tested it. Things like weak event listeners are gone.
The main issue I think will be the Event.ADDED and Event.REMOVED for ViewHelper automated register/unregister. Maybe we can have a CaingormViewBase class with support for these, or perhaps we can use the ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might be all that is needed, but it may not always work the same.
I'll try to tidy it up and share it tomorrow. The licence is BSD and is permissive (https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530671686&sdata=DHBc7NgQk3k%2BtrO4ra6I2vbY5f7wxUtN3ParR8Ij%2FoE%3D&reserved=0>) - It seems to be to be similar to others like MIT etc, but I don't know specifically what the rules are for Apache with that licence (in terms of possibility to include in Royale itself).
On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>> wrote:
Alex :
In flex use the swc. I am seeing the same thing that you are commenting, I do not understand where it assigns the remote objects to the ServiceLocator. This would have to be added to the "services" attribute of the RemoteObjects class. I will try to assign by code without using the mxml to see if it does not generate the error "null0".
El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>>) escribió:
I grabbed ServiceLocator.as and was able to produce the null0 problem, but the cause is that ServiceLocator does not have a default property. Did your MXML work in Flex? What ServiceLocator property would be assigned the mx:RemoteObject?
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 12:00 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
I download https://sourceforge.net/adobe/cairngorm/code/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530671686&sdata=z8X3SWlYOm4aq1VGTBvG0ExGaOQGx9KJkXn8yjJblug%3D&reserved=0>, and change.
import flash.utils.describeType;
--> import org.apache.royale.reflection.describeType;
import flash.utils.Dictionary;
--> import org.apache.royale.utils.ObjectMap;
And this method
/**
* Return all the accessors on this object.
* @param serviceLocator the IServiceLocator instance.
* @return this object's accessors.
*/
protected
function getAccessors(
serviceLocator : IServiceLocator ) :
XMLList
{
/*
var description : XML = describeType( serviceLocator );
var accessors : XMLList = description.accessor.( @access == "readwrite" ).@name;
return accessors;
*/
return describeType( serviceLocator).accessors(@access ==
"readwrite" ).@name;
}
El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>>) escribió:
Carlos, What Flash APIs is Cairngorm dependent on?
-Alex
From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 10:05 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Hi,
Cairngorm depends on Flash APIs, so make a Royale migration could be not easy, or requires some expertise.
You can use Crux instead that has support for Cairngorm style Commands. Crux is the same as Swiz Framework for Flex but rewritten to work in Royale, and supports much more like dependency injection, Inversion of control, event handling, ...
You have 3 examples in the examples/crux folder you can check.
I recommend you Crux over Cairngorm since Swiz was born to substitute Cairngorm
El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<gu...@gmail.com>>) escribió:
Alex
<version>0.9.7-SNAPSHOT</version>
Thank
El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>>) escribió:
What version of the compiler are you using?
What does the ServiceLocator source look like? It might be an issue with defaultProperties for non-DOM objects.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 7:35 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the construction of the ServiceLocator, I understand that it is an error of the MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
1. CODE
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530671686&sdata=91UZGR1Bf1BEfiYNOvDTzRKpsf%2Bul9eRz7AoFl8QFok%3D&reserved=0>"
xmlns:mx="library://ns.apache.org/royale/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530681640&sdata=5Ggy0LDajLn%2FCCoC8NIYJQCqcaO7v3AddRaI4jhq6AU%3D&reserved=0>"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject
id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
2. LINE OF ERROR (RED)
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray (MXMLDataInterpreter.js:126)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances (MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement (UIBase.js:402)
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530681640&sdata=hL3StxA4iJ%2BIO8Ol6x7LXKFYFKe7GeLDJgtti%2B5DRnk%3D&reserved=0>
--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530691596&sdata=0HD2ilJNwK6afrK2VNMbWQ91TrKtzJ1%2BUBox0%2BolKfE%3D&reserved=0>
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cf1f582c86fd54f88a24808d7ad75464d%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637168591530691596&sdata=0HD2ilJNwK6afrK2VNMbWQ91TrKtzJ1%2BUBox0%2BolKfE%3D&reserved=0>
Re: Cairngorm problem add remote object MXML.
Posted by Carlos Rovira <ca...@apache.org>.
Hi,
as Greg pointed combine different UI Sets can work at logic level, but can
generate unwanted visual results due to CSS problems. So you need to use
the "compiler.exclude-defaults-css-files", but this means that you have
Jewel or MX CSS.
This is recommended when you use non-ui visual classes like RemoteObject,
AMF, HTTPService, Validators , etc...
There's a plan to separate MXRoyale UI Set (MX) from non-visual classes, as
we have the time, so you can just add that dependency to you project if you
use other UI Set (MDL, Jewel, Basic,...)
At funcional level, Jewel should have the same UI options than MX and
probably more, since has new components like Drawe, TobBar, Badges or PopUp
to name just a few. Others are in the works, soon Tree,... and if you thing
something is missing, talk so we can know there's a concrete need.
Thanks
Carlos
El dom., 9 feb. 2020 a las 7:30, Greg Dove (<gr...@gmail.com>) escribió:
>
> There is a css clash between Jewel and MXRoyale, and there might be more
> issues at the child element level with different required base classes etc,
> but I am not sure because I did not try that. Alex will undoubtedly explain
> better than me.
> I am pretty sure you cannot use MXRoyale visual components combined with
> Jewel in the same project. But you do need the service related classes from
> MXRoyale for Cairngorm.
>
> I am testing Cairngorm using 'Express', but if you want to use Jewel (e.g.
> always <j:Button or <j:SomethingElse and never <mx:Something), the
> following should work so that you can still use the service classes from MX
> (which Cairngorm has hard dependencies for).
>
> Below is what I am doing... you need to add the third option of the
> following in maven:
> <additionalCompilerOptions>
> -js-default-initializers=true;
> -source-map=true;
>
> -compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
> </additionalCompilerOptions>
>
> The first 2 above are options I use during development - you may or may
> not want those.
>
> I will try to make the full source of what I have available for Cairngorm
> port in about 24 hours time from this email. I need to check all the
> licence stuff. I have a test app working but no view-related Cairngorm
> stuff yet.
>
>
>
>
>
> On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
>> Hi .
>>
>> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was
>> correct, the error does not reproduce anymore (null0).
>> *Greg*. I tried the library and it worked correctly, I would like to
>> know the implementation of the ServiceLocator.as how it is done, I made my
>> own and although it worked, I have problems when I add a jewel tag in the
>> project, for example a <j: Button>
>>
>> Is it possible or correct to have tag mx and jewel in the same project?
>>
>> *thanks to you .*
>>
>>
>> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>>> Make sure your app is using the updated compiler. I assume you are
>>> using Maven to compile the app? Check the pom.xml to make sure it is
>>> referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version.
>>> One trick is to add some System.out.println to the file that was changed
>>> and see if it shows up in the output.
>>>
>>>
>>>
>>> Regarding the tests, in the pom.xml for some of the projects like
>>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>>> which tests/files are run.
>>>
>>>
>>>
>>> HTH,
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Friday, February 7, 2020 at 3:15 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>> Hi, yesterday I tried with the change of Alex, from the royale-compiler
>>> without success, the "null0" continues. I don't know if I missed a step.
>>>
>>> I rebuilt with the royale-compiler project "mvn clean install" and tried
>>> again the compilation of my project.
>>>
>>> On the other hand I am seeing to create a Test in the project, but I see
>>> that they are not running the tests of the package "royale-compiler \
>>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>>> internal \ codegen \ mxml \ ...", do you know why?
>>>
>>>
>>>
>>> Thanks.
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>>> escribió:
>>>
>>>
>>> I'll try to get an minimal example working over my weekend sometime to
>>> test what I have. I made a quick start on that, just to get something that
>>> compiles. Once I see that it seems to be working I will release to git repo
>>> for the port.
>>>
>>> If you do want to try a different swc from what you already have, you
>>> could try one now from builds here I think:
>>>
>>>
>>>
>>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>>
>>>
>>>
>>> (I will remove that link in some days once the port is more thoroughly
>>> tested and available to all)
>>>
>>>
>>>
>>> I was able to inspect and verify that the js build had a ServicesLocator
>>> (as defined in that swc) mxml subclass which was populating correctly with
>>> the recent compiler changes from Alex, but I am not yet able to test more
>>> thoroughly. The view support probably won't work yet because there are no
>>> 'added' and 'removed' events, but we will figure something out.
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>>>
>>>
>>> Alex, I tested this change today. There is more to it than that, it
>>> seems. I will discuss details in dev list.
>>>
>>>
>>>
>>>
>>>
>>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>>
>>> royale-compiler
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>> Sorry Alex, what repository is that of the push ?
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> I just pushed a change to the compiler. It should now have valid output
>>> for ServiceLocator.
>>>
>>>
>>>
>>> The compiler change was interesting in that I changed an else clause
>>> that was put in to handle instances specified as children of top tags but
>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>> that code so none of our tests actually used that code, even though the
>>> commit log implied it was for one of the tests. Either I made the earlier
>>> change to propagate the fix for plain properties to instances or there is
>>> some other scenario for instances as children (without a default property)
>>> that I am not thinking of.
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we save
>>> a lot of time in migrations where they use it and leave more time for other
>>> questions.
>>>
>>> i will continue to test how to fill that array today.
>>>
>>> Thank you very much for everyone in this collaboration.
>>>
>>>
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
>>> escribió:
>>>
>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
>>> :)
>>>
>>>
>>>
>>> I know Cairngorm could be good for people wanting to migrate with the
>>> less effort possible. Anyway, I recommend, if possible to try to switch to
>>> Crux. We already did that several years ago in Flex, since all DI, IOC
>>> stuff, make us be more efficient and increase options. For people creating
>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>> the Crux option if they continue evolving the app with new features...
>>>
>>>
>>>
>>> just my 2 :)
>>>
>>>
>>>
>>> Carlos
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
>>> escribió:
>>>
>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>> Carlos, thanks all the times.^_^
>>>
>>>
>>>
>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>
>>>
>>>
>>> Hi Takeshita,
>>>
>>>
>>>
>>> Yes I think a few people have asked for Cairngorm or expressed interest
>>> in it. Given the choice, I personally think Crux will be a more
>>> modern/better option, but like I said, more people are asking for Cairngorm
>>> now, so probably it makes sense to port that too.
>>>
>>>
>>>
>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>> well for you. Please report any issues if you see them.
>>>
>>>
>>>
>>> One small thing: I definitely understand that you were referring to the
>>> work I did on porting it to Royale, but just for the sake of anyone else
>>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>>> from Swiz, and credit for the awesome features it has rests with the
>>> original authors of Swiz (I was in contact with the original developer
>>> during my efforts to port it to Royale).
>>>
>>> Also, just so people are aware, Carlos sponsored the majority of my work
>>> on porting that, so you really have Carlos to thank for that.
>>>
>>>
>>>
>>> cheers,
>>>
>>> Greg
>>>
>>>
>>>
>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>> wrote:
>>>
>>> Greg,
>>>
>>>
>>>
>>> Thanks for your work. We already have your Crux framework replacing
>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>> plenty of time of emulation work.
>>>
>>>
>>>
>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>
>>>
>>> There does not appear to be a default property, like an array to put the
>>> 'children' in. I think it just creates the children as instances and makes
>>> sure they have id properties on the mxml-generated subclass that the
>>> instances are assigned to.
>>>
>>>
>>>
>>> The services are then identified and categorised by iterating the
>>> accessors of the ServiceLocator subclass via reflection and checking their
>>> types and then registering them.
>>>
>>> Although it is and mxml instance of ServiceLocator, it is also an
>>> enforced singleton which is accessed elsewhere from code. At least that is
>>> how it appears to be set up to me.
>>>
>>>
>>>
>>> I already took a look at the code and have made (not many) local changes
>>> and have the Cairngorm swc compiling via maven for both js and swf. I have
>>> not tested it. Things like weak event listeners are gone.
>>>
>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>> ViewHelper automated register/unregister. Maybe we can have a
>>> CaingormViewBase class with support for these, or perhaps we can use the
>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>> be all that is needed, but it may not always work the same.
>>>
>>>
>>>
>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>>> permissive (
>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>>> It seems to be to be similar to others like MIT etc, but I don't know
>>> specifically what the rules are for Apache with that licence (in terms of
>>> possibility to include in Royale itself).
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>> gustavodecarli@gmail.com> wrote:
>>>
>>> Alex :
>>>
>>>
>>> In flex use the swc. I am seeing the same thing that you are commenting,
>>> I do not understand where it assigns the remote objects to the
>>> ServiceLocator. This would have to be added to the "services" attribute of
>>> the RemoteObjects class. I will try to assign by code without using the
>>> mxml to see if it does not generate the error "null0".
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>> but the cause is that ServiceLocator does not have a default property. Did
>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>> mx:RemoteObject?
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>>> and change.
>>>
>>>
>>>
>>> import flash.utils.describeType;
>>>
>>> --> import org.apache.royale.reflection.describeType;
>>>
>>> import flash.utils.Dictionary;
>>>
>>> --> import org.apache.royale.utils.ObjectMap;
>>>
>>>
>>>
>>> And this method
>>>
>>>
>>>
>>>
>>>
>>> /**
>>>
>>>
>>>
>>> * Return all the accessors on this object.
>>>
>>>
>>>
>>> * @param serviceLocator the IServiceLocator instance.
>>>
>>>
>>>
>>> * @return this object's accessors.
>>>
>>>
>>>
>>> */
>>>
>>>
>>>
>>> protected
>>>
>>> function getAccessors(
>>>
>>> serviceLocator : IServiceLocator ) :
>>>
>>> XMLList
>>>
>>>
>>>
>>> {
>>>
>>>
>>>
>>> /*
>>>
>>>
>>>
>>> var description : XML = describeType( serviceLocator );
>>>
>>>
>>>
>>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>>> ).@name;
>>>
>>>
>>>
>>>
>>>
>>> return accessors;
>>>
>>>
>>>
>>> */
>>>
>>>
>>>
>>>
>>>
>>> return describeType( serviceLocator).accessors(@access ==
>>>
>>> "readwrite" ).@name;
>>>
>>>
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *Carlos Rovira <ca...@apache.org>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>>> easy, or requires some expertise.
>>>
>>> You can use Crux instead that has support for Cairngorm style Commands.
>>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>>> Royale, and supports much more like dependency injection, Inversion of
>>> control, event handling, ...
>>>
>>> You have 3 examples in the examples/crux folder you can check.
>>>
>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>> Cairngorm
>>>
>>>
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>> gustavodecarli@gmail.com>) escribió:
>>>
>>> Alex
>>>
>>>
>>>
>>> <version>0.9.7-SNAPSHOT</version>
>>>
>>>
>>>
>>> Thank
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> What version of the compiler are you using?
>>>
>>>
>>>
>>> What does the ServiceLocator source look like? It might be an issue
>>> with defaultProperties for non-DOM objects.
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>>
>>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>>> the construction of the ServiceLocator, I understand that it is an error of
>>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>
>>> Thank
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> *1. CODE *
>>>
>>>
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>>
>>>
>>>
>>> <cairngorm:ServiceLocator
>>>
>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:mx="library://ns.apache.org/royale/mx
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>
>>>
>>>
>>>
>>>
>>> <mx:RemoteObject
>>>
>>> id="srvSeguridades"
>>>
>>>
>>>
>>> destination="seguridades"
>>>
>>>
>>>
>>> result="event.token.resultHandler(event)"
>>>
>>>
>>>
>>> fault="event.token.faultHandler(event)"
>>>
>>>
>>>
>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>
>>>
>>>
>>>
>>>
>>> </cairngorm:ServiceLocator>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *2. LINE OF ERROR (RED)*
>>>
>>> /
>>>
>>>
>>>
>>> **
>>> * @constructor
>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>> */
>>> services.Servicio = function() {
>>> services.Servicio.base(this, 'constructor');
>>>
>>> /**
>>> * @private
>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>> */
>>> this.srvSeguridades_;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldd;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldp;
>>>
>>> this.generateMXMLAttributes
>>> ([1,
>>> mx.rpc.remoting.mxml.RemoteObject,
>>> 3,
>>> 'id',
>>> true,
>>> 'srvSeguridades',
>>> 'destination',
>>> true,
>>> 'seguridades',
>>> 'endpoint',
>>> true,
>>> 'http://localhost:8080/messagebroker/amf',
>>> 0,
>>> 2,
>>> 'result',
>>> this.$EH0,
>>> 'fault',
>>> this.$EH1,
>>> null0, <- ERROR
>>> 0
>>> ]);
>>>
>>> };
>>>
>>>
>>>
>>>
>>>
>>> 3. Trace console log
>>>
>>>
>>>
>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>> at new services.Servicio (Servicio.js:61)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>> (MXMLDataInterpreter.js:126)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>> (MXMLDataInterpreter.js:271)
>>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>> at
>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>> (UIBase.js:402)
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Carlos Rovira
>>>
>>> http://about.me/carlosrovira
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>>
>>>
>>>
>>> --
>>>
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>>
>>> --
>>>
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Carlos Rovira
>>>
>>> http://about.me/carlosrovira
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>>
>>>
>>>
>>>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
There is a css clash between Jewel and MXRoyale, and there might be more
issues at the child element level with different required base classes etc,
but I am not sure because I did not try that. Alex will undoubtedly explain
better than me.
I am pretty sure you cannot use MXRoyale visual components combined with
Jewel in the same project. But you do need the service related classes from
MXRoyale for Cairngorm.
I am testing Cairngorm using 'Express', but if you want to use Jewel (e.g.
always <j:Button or <j:SomethingElse and never <mx:Something), the
following should work so that you can still use the service classes from MX
(which Cairngorm has hard dependencies for).
Below is what I am doing... you need to add the third option of the
following in maven:
<additionalCompilerOptions>
-js-default-initializers=true;
-source-map=true;
-compiler.exclude-defaults-css-files=MXRoyale-0.9.7-SNAPSHOT-js.swc:defaults.css;
</additionalCompilerOptions>
The first 2 above are options I use during development - you may or may not
want those.
I will try to make the full source of what I have available for Cairngorm
port in about 24 hours time from this email. I need to check all the
licence stuff. I have a test app working but no view-related Cairngorm
stuff yet.
On Sun, Feb 9, 2020 at 12:33 PM De Carli Gustavo <gu...@gmail.com>
wrote:
> Hi .
>
> *Alex* : 0.9.7-snapshot royale-compiler - you're right, this was correct,
> the error does not reproduce anymore (null0).
> *Greg*. I tried the library and it worked correctly, I would like to know
> the implementation of the ServiceLocator.as how it is done, I made my own
> and although it worked, I have problems when I add a jewel tag in the
> project, for example a <j: Button>
>
> Is it possible or correct to have tag mx and jewel in the same project?
>
> *thanks to you .*
>
>
> El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>)
> escribió:
>
>> Make sure your app is using the updated compiler. I assume you are using
>> Maven to compile the app? Check the pom.xml to make sure it is referencing
>> the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version. One trick is
>> to add some System.out.println to the file that was changed and see if it
>> shows up in the output.
>>
>>
>>
>> Regarding the tests, in the pom.xml for some of the projects like
>> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
>> which tests/files are run.
>>
>>
>>
>> HTH,
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Friday, February 7, 2020 at 3:15 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>> Hi, yesterday I tried with the change of Alex, from the royale-compiler
>> without success, the "null0" continues. I don't know if I missed a step.
>>
>> I rebuilt with the royale-compiler project "mvn clean install" and tried
>> again the compilation of my project.
>>
>> On the other hand I am seeing to create a Test in the project, but I see
>> that they are not running the tests of the package "royale-compiler \
>> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
>> internal \ codegen \ mxml \ ...", do you know why?
>>
>>
>>
>> Thanks.
>>
>> Gustavo.
>>
>>
>>
>> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
>> escribió:
>>
>>
>> I'll try to get an minimal example working over my weekend sometime to
>> test what I have. I made a quick start on that, just to get something that
>> compiles. Once I see that it seems to be working I will release to git repo
>> for the port.
>>
>> If you do want to try a different swc from what you already have, you
>> could try one now from builds here I think:
>>
>>
>>
>> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>>
>>
>>
>> (I will remove that link in some days once the port is more thoroughly
>> tested and available to all)
>>
>>
>>
>> I was able to inspect and verify that the js build had a ServicesLocator
>> (as defined in that swc) mxml subclass which was populating correctly with
>> the recent compiler changes from Alex, but I am not yet able to test more
>> thoroughly. The view support probably won't work yet because there are no
>> 'added' and 'removed' events, but we will figure something out.
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>>
>>
>> Alex, I tested this change today. There is more to it than that, it
>> seems. I will discuss details in dev list.
>>
>>
>>
>>
>>
>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>
>> royale-compiler
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>> Sorry Alex, what repository is that of the push ?
>>
>>
>>
>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> I just pushed a change to the compiler. It should now have valid output
>> for ServiceLocator.
>>
>>
>>
>> The compiler change was interesting in that I changed an else clause that
>> was put in to handle instances specified as children of top tags but was
>> doing the wrong thing. All of the compiler tests passed, but never hit
>> that code so none of our tests actually used that code, even though the
>> commit log implied it was for one of the tests. Either I made the earlier
>> change to propagate the fix for plain properties to instances or there is
>> some other scenario for instances as children (without a default property)
>> that I am not thinking of.
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>> Exactly, cairmgorm, as Carlos says, is not the best option, but we save a
>> lot of time in migrations where they use it and leave more time for other
>> questions.
>>
>> i will continue to test how to fill that array today.
>>
>> Thank you very much for everyone in this collaboration.
>>
>>
>>
>> Gustavo.
>>
>>
>>
>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
>> escribió:
>>
>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
>> :)
>>
>>
>>
>> I know Cairngorm could be good for people wanting to migrate with the
>> less effort possible. Anyway, I recommend, if possible to try to switch to
>> Crux. We already did that several years ago in Flex, since all DI, IOC
>> stuff, make us be more efficient and increase options. For people creating
>> new apps, for me there's no doubt, for people migrating, should contemplate
>> the Crux option if they continue evolving the app with new features...
>>
>>
>>
>> just my 2 :)
>>
>>
>>
>> Carlos
>>
>>
>>
>>
>>
>>
>>
>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
>> escribió:
>>
>> Greg, thanks for your clarification. Anyway, it is a great work.
>> Carlos, thanks all the times.^_^
>>
>>
>>
>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>
>>
>>
>> Hi Takeshita,
>>
>>
>>
>> Yes I think a few people have asked for Cairngorm or expressed interest
>> in it. Given the choice, I personally think Crux will be a more
>> modern/better option, but like I said, more people are asking for Cairngorm
>> now, so probably it makes sense to port that too.
>>
>>
>>
>> I'm also pleased to hear that you are using Crux, I hope it's working
>> well for you. Please report any issues if you see them.
>>
>>
>>
>> One small thing: I definitely understand that you were referring to the
>> work I did on porting it to Royale, but just for the sake of anyone else
>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>> from Swiz, and credit for the awesome features it has rests with the
>> original authors of Swiz (I was in contact with the original developer
>> during my efforts to port it to Royale).
>>
>> Also, just so people are aware, Carlos sponsored the majority of my work
>> on porting that, so you really have Carlos to thank for that.
>>
>>
>>
>> cheers,
>>
>> Greg
>>
>>
>>
>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>> wrote:
>>
>> Greg,
>>
>>
>>
>> Thanks for your work. We already have your Crux framework replacing
>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>> plenty of time of emulation work.
>>
>>
>>
>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>
>>
>> There does not appear to be a default property, like an array to put the
>> 'children' in. I think it just creates the children as instances and makes
>> sure they have id properties on the mxml-generated subclass that the
>> instances are assigned to.
>>
>>
>>
>> The services are then identified and categorised by iterating the
>> accessors of the ServiceLocator subclass via reflection and checking their
>> types and then registering them.
>>
>> Although it is and mxml instance of ServiceLocator, it is also an
>> enforced singleton which is accessed elsewhere from code. At least that is
>> how it appears to be set up to me.
>>
>>
>>
>> I already took a look at the code and have made (not many) local changes
>> and have the Cairngorm swc compiling via maven for both js and swf. I have
>> not tested it. Things like weak event listeners are gone.
>>
>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>> ViewHelper automated register/unregister. Maybe we can have a
>> CaingormViewBase class with support for these, or perhaps we can use the
>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>> be all that is needed, but it may not always work the same.
>>
>>
>>
>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>> permissive (
>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
>> It seems to be to be similar to others like MIT etc, but I don't know
>> specifically what the rules are for Apache with that licence (in terms of
>> possibility to include in Royale itself).
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
>> wrote:
>>
>> Alex :
>>
>>
>> In flex use the swc. I am seeing the same thing that you are commenting,
>> I do not understand where it assigns the remote objects to the
>> ServiceLocator. This would have to be added to the "services" attribute of
>> the RemoteObjects class. I will try to assign by code without using the
>> mxml to see if it does not generate the error "null0".
>>
>>
>>
>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>> but the cause is that ServiceLocator does not have a default property. Did
>> your MXML work in Flex? What ServiceLocator property would be assigned the
>> mx:RemoteObject?
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>> I download https://sourceforge.net/adobe/cairngorm/code/
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
>> and change.
>>
>>
>>
>> import flash.utils.describeType;
>>
>> --> import org.apache.royale.reflection.describeType;
>>
>> import flash.utils.Dictionary;
>>
>> --> import org.apache.royale.utils.ObjectMap;
>>
>>
>>
>> And this method
>>
>>
>>
>>
>>
>> /**
>>
>>
>>
>> * Return all the accessors on this object.
>>
>>
>>
>> * @param serviceLocator the IServiceLocator instance.
>>
>>
>>
>> * @return this object's accessors.
>>
>>
>>
>> */
>>
>>
>>
>> protected
>>
>> function getAccessors(
>>
>> serviceLocator : IServiceLocator ) :
>>
>> XMLList
>>
>>
>>
>> {
>>
>>
>>
>> /*
>>
>>
>>
>> var description : XML = describeType( serviceLocator );
>>
>>
>>
>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>> ).@name;
>>
>>
>>
>>
>>
>> return accessors;
>>
>>
>>
>> */
>>
>>
>>
>>
>>
>> return describeType( serviceLocator).accessors(@access ==
>>
>> "readwrite" ).@name;
>>
>>
>>
>> }
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> Carlos, What Flash APIs is Cairngorm dependent on?
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *Carlos Rovira <ca...@apache.org>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>> Hi,
>>
>>
>>
>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>> easy, or requires some expertise.
>>
>> You can use Crux instead that has support for Cairngorm style Commands.
>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>> Royale, and supports much more like dependency injection, Inversion of
>> control, event handling, ...
>>
>> You have 3 examples in the examples/crux folder you can check.
>>
>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>> Cairngorm
>>
>>
>>
>>
>>
>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>> gustavodecarli@gmail.com>) escribió:
>>
>> Alex
>>
>>
>>
>> <version>0.9.7-SNAPSHOT</version>
>>
>>
>>
>> Thank
>>
>>
>>
>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> What version of the compiler are you using?
>>
>>
>>
>> What does the ServiceLocator source look like? It might be an issue with
>> defaultProperties for non-DOM objects.
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>>
>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>> the construction of the ServiceLocator, I understand that it is an error of
>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>
>> Thank
>>
>> Gustavo.
>>
>>
>>
>> *1. CODE *
>>
>>
>>
>>
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>
>>
>>
>> <cairngorm:ServiceLocator
>>
>> xmlns:fx="http://ns.adobe.com/mxml/2009
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:mx="library://ns.apache.org/royale/mx
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>
>>
>>
>>
>>
>> <mx:RemoteObject
>>
>> id="srvSeguridades"
>>
>>
>>
>> destination="seguridades"
>>
>>
>>
>> result="event.token.resultHandler(event)"
>>
>>
>>
>> fault="event.token.faultHandler(event)"
>>
>>
>>
>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>
>>
>>
>>
>>
>> </cairngorm:ServiceLocator>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *2. LINE OF ERROR (RED)*
>>
>> /
>>
>>
>>
>> **
>> * @constructor
>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>> */
>> services.Servicio = function() {
>> services.Servicio.base(this, 'constructor');
>>
>> /**
>> * @private
>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>> */
>> this.srvSeguridades_;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldd;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldp;
>>
>> this.generateMXMLAttributes
>> ([1,
>> mx.rpc.remoting.mxml.RemoteObject,
>> 3,
>> 'id',
>> true,
>> 'srvSeguridades',
>> 'destination',
>> true,
>> 'seguridades',
>> 'endpoint',
>> true,
>> 'http://localhost:8080/messagebroker/amf',
>> 0,
>> 2,
>> 'result',
>> this.$EH0,
>> 'fault',
>> this.$EH1,
>> null0, <- ERROR
>> 0
>> ]);
>>
>> };
>>
>>
>>
>>
>>
>> 3. Trace console log
>>
>>
>>
>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>> at new services.Servicio (Servicio.js:61)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>> (MXMLDataInterpreter.js:126)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>> (MXMLDataInterpreter.js:271)
>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>> at
>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>> (UIBase.js:402)
>>
>>
>>
>>
>> --
>>
>> Carlos Rovira
>>
>> http://about.me/carlosrovira
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>>
>>
>>
>> --
>>
>> Shoichiro Takeshita
>> 武下 祥一郎
>>
>> --
>>
>> Shoichiro Takeshita
>> 武下 祥一郎
>>
>>
>>
>>
>> --
>>
>> Carlos Rovira
>>
>> http://about.me/carlosrovira
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>>
>>
>>
>>
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Hi .
*Alex* : 0.9.7-snapshot royale-compiler - you're right, this was correct,
the error does not reproduce anymore (null0).
*Greg*. I tried the library and it worked correctly, I would like to know
the implementation of the ServiceLocator.as how it is done, I made my own
and although it worked, I have problems when I add a jewel tag in the
project, for example a <j: Button>
Is it possible or correct to have tag mx and jewel in the same project?
*thanks to you .*
El vie., 7 feb. 2020 a las 14:14, Alex Harui (<ah...@adobe.com>) escribió:
> Make sure your app is using the updated compiler. I assume you are using
> Maven to compile the app? Check the pom.xml to make sure it is referencing
> the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version. One trick is
> to add some System.out.println to the file that was changed and see if it
> shows up in the output.
>
>
>
> Regarding the tests, in the pom.xml for some of the projects like
> compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate
> which tests/files are run.
>
>
>
> HTH,
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Friday, February 7, 2020 at 3:15 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
> Hi, yesterday I tried with the change of Alex, from the royale-compiler
> without success, the "null0" continues. I don't know if I missed a step.
>
> I rebuilt with the royale-compiler project "mvn clean install" and tried
> again the compilation of my project.
>
> On the other hand I am seeing to create a Test in the project, but I see
> that they are not running the tests of the package "royale-compiler \
> compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
> internal \ codegen \ mxml \ ...", do you know why?
>
>
>
> Thanks.
>
> Gustavo.
>
>
>
> El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>)
> escribió:
>
>
> I'll try to get an minimal example working over my weekend sometime to
> test what I have. I made a quick start on that, just to get something that
> compiles. Once I see that it seems to be working I will release to git repo
> for the port.
>
> If you do want to try a different swc from what you already have, you
> could try one now from builds here I think:
>
>
>
> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
>
>
>
> (I will remove that link in some days once the port is more thoroughly
> tested and available to all)
>
>
>
> I was able to inspect and verify that the js build had a ServicesLocator
> (as defined in that swc) mxml subclass which was populating correctly with
> the recent compiler changes from Alex, but I am not yet able to test more
> thoroughly. The view support probably won't work yet because there are no
> 'added' and 'removed' events, but we will figure something out.
>
>
>
>
>
>
>
>
>
> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>
>
> Alex, I tested this change today. There is more to it than that, it seems.
> I will discuss details in dev list.
>
>
>
>
>
> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>
> royale-compiler
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, February 6, 2020 at 11:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Sorry Alex, what repository is that of the push ?
>
>
>
> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> I just pushed a change to the compiler. It should now have valid output
> for ServiceLocator.
>
>
>
> The compiler change was interesting in that I changed an else clause that
> was put in to handle instances specified as children of top tags but was
> doing the wrong thing. All of the compiler tests passed, but never hit
> that code so none of our tests actually used that code, even though the
> commit log implied it was for one of the tests. Either I made the earlier
> change to propagate the fix for plain properties to instances or there is
> some other scenario for instances as children (without a default property)
> that I am not thinking of.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, February 6, 2020 at 6:03 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
> Exactly, cairmgorm, as Carlos says, is not the best option, but we save a
> lot of time in migrations where they use it and leave more time for other
> questions.
>
> i will continue to test how to fill that array today.
>
> Thank you very much for everyone in this collaboration.
>
>
>
> Gustavo.
>
>
>
> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
> :)
>
>
>
> I know Cairngorm could be good for people wanting to migrate with the less
> effort possible. Anyway, I recommend, if possible to try to switch to Crux.
> We already did that several years ago in Flex, since all DI, IOC stuff,
> make us be more efficient and increase options. For people creating new
> apps, for me there's no doubt, for people migrating, should contemplate the
> Crux option if they continue evolving the app with new features...
>
>
>
> just my 2 :)
>
>
>
> Carlos
>
>
>
>
>
>
>
> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
> escribió:
>
> Greg, thanks for your clarification. Anyway, it is a great work.
> Carlos, thanks all the times.^_^
>
>
>
> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>
>
>
> Hi Takeshita,
>
>
>
> Yes I think a few people have asked for Cairngorm or expressed interest in
> it. Given the choice, I personally think Crux will be a more modern/better
> option, but like I said, more people are asking for Cairngorm now, so
> probably it makes sense to port that too.
>
>
>
> I'm also pleased to hear that you are using Crux, I hope it's working well
> for you. Please report any issues if you see them.
>
>
>
> One small thing: I definitely understand that you were referring to the
> work I did on porting it to Royale, but just for the sake of anyone else
> who reads this: it's definitely not 'my Crux framework'. The code is ported
> from Swiz, and credit for the awesome features it has rests with the
> original authors of Swiz (I was in contact with the original developer
> during my efforts to port it to Royale).
>
> Also, just so people are aware, Carlos sponsored the majority of my work
> on porting that, so you really have Carlos to thank for that.
>
>
>
> cheers,
>
> Greg
>
>
>
> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
> wrote:
>
> Greg,
>
>
>
> Thanks for your work. We already have your Crux framework replacing
> Cairngorm, it is great if Cairngorm works with Royale. It will save a
> plenty of time of emulation work.
>
>
>
> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>
>
> There does not appear to be a default property, like an array to put the
> 'children' in. I think it just creates the children as instances and makes
> sure they have id properties on the mxml-generated subclass that the
> instances are assigned to.
>
>
>
> The services are then identified and categorised by iterating the
> accessors of the ServiceLocator subclass via reflection and checking their
> types and then registering them.
>
> Although it is and mxml instance of ServiceLocator, it is also an enforced
> singleton which is accessed elsewhere from code. At least that is how it
> appears to be set up to me.
>
>
>
> I already took a look at the code and have made (not many) local changes
> and have the Cairngorm swc compiling via maven for both js and swf. I have
> not tested it. Things like weak event listeners are gone.
>
> The main issue I think will be the Event.ADDED and Event.REMOVED for
> ViewHelper automated register/unregister. Maybe we can have a
> CaingormViewBase class with support for these, or perhaps we can use the
> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
> be all that is needed, but it may not always work the same.
>
>
>
> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
> permissive (
> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) -
> It seems to be to be similar to others like MIT etc, but I don't know
> specifically what the rules are for Apache with that licence (in terms of
> possibility to include in Royale itself).
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
> Alex :
>
>
> In flex use the swc. I am seeing the same thing that you are commenting, I
> do not understand where it assigns the remote objects to the
> ServiceLocator. This would have to be added to the "services" attribute of
> the RemoteObjects class. I will try to assign by code without using the
> mxml to see if it does not generate the error "null0".
>
>
>
> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> I grabbed ServiceLocator.as and was able to produce the null0 problem, but
> the cause is that ServiceLocator does not have a default property. Did
> your MXML work in Flex? What ServiceLocator property would be assigned the
> mx:RemoteObject?
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 12:00 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
>
> I download https://sourceforge.net/adobe/cairngorm/code/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>,
> and change.
>
>
>
> import flash.utils.describeType;
>
> --> import org.apache.royale.reflection.describeType;
>
> import flash.utils.Dictionary;
>
> --> import org.apache.royale.utils.ObjectMap;
>
>
>
> And this method
>
>
>
>
>
> /**
>
>
>
> * Return all the accessors on this object.
>
>
>
> * @param serviceLocator the IServiceLocator instance.
>
>
>
> * @return this object's accessors.
>
>
>
> */
>
>
>
> protected
>
> function getAccessors(
>
> serviceLocator : IServiceLocator ) :
>
> XMLList
>
>
>
> {
>
>
>
> /*
>
>
>
> var description : XML = describeType( serviceLocator );
>
>
>
> var accessors : XMLList = description.accessor.( @access == "readwrite"
> ).@name;
>
>
>
>
>
> return accessors;
>
>
>
> */
>
>
>
>
>
> return describeType( serviceLocator).accessors(@access ==
>
> "readwrite" ).@name;
>
>
>
> }
>
>
>
>
>
>
>
>
>
> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> Carlos, What Flash APIs is Cairngorm dependent on?
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Hi,
>
>
>
> Cairngorm depends on Flash APIs, so make a Royale migration could be not
> easy, or requires some expertise.
>
> You can use Crux instead that has support for Cairngorm style Commands.
> Crux is the same as Swiz Framework for Flex but rewritten to work in
> Royale, and supports much more like dependency injection, Inversion of
> control, event handling, ...
>
> You have 3 examples in the examples/crux folder you can check.
>
> I recommend you Crux over Cairngorm since Swiz was born to substitute
> Cairngorm
>
>
>
>
>
> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
> gustavodecarli@gmail.com>) escribió:
>
> Alex
>
>
>
> <version>0.9.7-SNAPSHOT</version>
>
>
>
> Thank
>
>
>
> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> What version of the compiler are you using?
>
>
>
> What does the ServiceLocator source look like? It might be an issue with
> defaultProperties for non-DOM objects.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 7:35 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Cairngorm problem add remote object MXML.
>
>
>
>
>
>
> I am trying to transcribe gairngorm, at runtime it gives me an error in
> the construction of the ServiceLocator, I understand that it is an error of
> the MXMLDataInterpreter. Anyone have any idea of the problem.
>
> Thank
>
> Gustavo.
>
>
>
> *1. CODE *
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <cairngorm:ServiceLocator
>
> xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>
> "
>
>
>
> xmlns:mx="library://ns.apache.org/royale/mx
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>
> "
>
>
>
> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>
>
>
>
>
> <mx:RemoteObject
>
> id="srvSeguridades"
>
>
>
> destination="seguridades"
>
>
>
> result="event.token.resultHandler(event)"
>
>
>
> fault="event.token.faultHandler(event)"
>
>
>
> endpoint="http://localhost:8080/messagebroker/amf"/>
>
>
>
>
>
> </cairngorm:ServiceLocator>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *2. LINE OF ERROR (RED)*
>
> /
>
>
>
> **
> * @constructor
> * @extends {com.adobe.cairngorm.business.ServiceLocator}
> */
> services.Servicio = function() {
> services.Servicio.base(this, 'constructor');
>
> /**
> * @private
> * @type {mx.rpc.remoting.mxml.RemoteObject}
> */
> this.srvSeguridades_;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldd;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldp;
>
> this.generateMXMLAttributes
> ([1,
> mx.rpc.remoting.mxml.RemoteObject,
> 3,
> 'id',
> true,
> 'srvSeguridades',
> 'destination',
> true,
> 'seguridades',
> 'endpoint',
> true,
> 'http://localhost:8080/messagebroker/amf',
> 0,
> 2,
> 'result',
> this.$EH0,
> 'fault',
> this.$EH1,
> null0, <- ERROR
> 0
> ]);
>
> };
>
>
>
>
>
> 3. Trace console log
>
>
>
> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
> at new services.Servicio (Servicio.js:61)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
> (MXMLDataInterpreter.js:126)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
> (MXMLDataInterpreter.js:271)
> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
> at main.Main.mx.core.Container.createChildren (Container.js:136)
> at main.Main.mx.core.Application.createChildren (Application.js:122)
> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
> at main.Main.mx.core.Container.addedToParent (Container.js:123)
> at
> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
> (UIBase.js:402)
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
>
>
>
> --
>
> Shoichiro Takeshita
> 武下 祥一郎
>
> --
>
> Shoichiro Takeshita
> 武下 祥一郎
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
>
>
>
>
Re: Cairngorm problem add remote object MXML.
Posted by Alex Harui <ah...@adobe.com>.
Make sure your app is using the updated compiler. I assume you are using Maven to compile the app? Check the pom.xml to make sure it is referencing the 0.9.7-SNAPSHOT and not just 0.9.7 or some other version. One trick is to add some System.out.println to the file that was changed and see if it shows up in the output.
Regarding the tests, in the pom.xml for some of the projects like compiler-jx, the maven-surefire-plugin and maven-failsafe-plugin dictate which tests/files are run.
HTH,
-Alex
From: De Carli Gustavo <gu...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Friday, February 7, 2020 at 3:15 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Cairngorm problem add remote object MXML.
Hi, yesterday I tried with the change of Alex, from the royale-compiler without success, the "null0" continues. I don't know if I missed a step.
I rebuilt with the royale-compiler project "mvn clean install" and tried again the compilation of my project.
On the other hand I am seeing to create a Test in the project, but I see that they are not running the tests of the package "royale-compiler \ compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \ internal \ codegen \ mxml \ ...", do you know why?
Thanks.
Gustavo.
El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>>) escribió:
I'll try to get an minimal example working over my weekend sometime to test what I have. I made a quick start on that, just to get something that compiles. Once I see that it seems to be working I will release to git repo for the port.
If you do want to try a different swc from what you already have, you could try one now from builds here I think:
https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fwww.dropbox.com%2Fsh%2Fxk8aui9ghy30mid%2FAAAAx0LUpfjXEQWC221zAjTza%3Fdl%3D0&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=6YfYnU896lHruaduCxUnrCkndhecXz7JELyQBoJd%2FFU%3D&reserved=0>
(I will remove that link in some days once the port is more thoroughly tested and available to all)
I was able to inspect and verify that the js build had a ServicesLocator (as defined in that swc) mxml subclass which was populating correctly with the recent compiler changes from Alex, but I am not yet able to test more thoroughly. The view support probably won't work yet because there are no 'added' and 'removed' events, but we will figure something out.
On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com>> wrote:
Alex, I tested this change today. There is more to it than that, it seems. I will discuss details in dev list.
On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com>> wrote:
royale-compiler
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, February 6, 2020 at 11:39 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Sorry Alex, what repository is that of the push ?
El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>>) escribió:
I just pushed a change to the compiler. It should now have valid output for ServiceLocator.
The compiler change was interesting in that I changed an else clause that was put in to handle instances specified as children of top tags but was doing the wrong thing. All of the compiler tests passed, but never hit that code so none of our tests actually used that code, even though the commit log implied it was for one of the tests. Either I made the earlier change to propagate the fix for plain properties to instances or there is some other scenario for instances as children (without a default property) that I am not thinking of.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, February 6, 2020 at 6:03 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Exactly, cairmgorm, as Carlos says, is not the best option, but we save a lot of time in migrations where they use it and leave more time for other questions.
i will continue to test how to fill that array today.
Thank you very much for everyone in this collaboration.
Gustavo.
El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>>) escribió:
Thanks Greg, for the sponsor credits, and thanks Takeshita for the words :)
I know Cairngorm could be good for people wanting to migrate with the less effort possible. Anyway, I recommend, if possible to try to switch to Crux. We already did that several years ago in Flex, since all DI, IOC stuff, make us be more efficient and increase options. For people creating new apps, for me there's no doubt, for people migrating, should contemplate the Crux option if they continue evolving the app with new features...
just my 2 :)
Carlos
El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>>) escribió:
Greg, thanks for your clarification. Anyway, it is a great work. Carlos, thanks all the times.^_^
2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>>:
Hi Takeshita,
Yes I think a few people have asked for Cairngorm or expressed interest in it. Given the choice, I personally think Crux will be a more modern/better option, but like I said, more people are asking for Cairngorm now, so probably it makes sense to port that too.
I'm also pleased to hear that you are using Crux, I hope it's working well for you. Please report any issues if you see them.
One small thing: I definitely understand that you were referring to the work I did on porting it to Royale, but just for the sake of anyone else who reads this: it's definitely not 'my Crux framework'. The code is ported from Swiz, and credit for the awesome features it has rests with the original authors of Swiz (I was in contact with the original developer during my efforts to port it to Royale).
Also, just so people are aware, Carlos sponsored the majority of my work on porting that, so you really have Carlos to thank for that.
cheers,
Greg
On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>> wrote:
Greg,
Thanks for your work. We already have your Crux framework replacing Cairngorm, it is great if Cairngorm works with Royale. It will save a plenty of time of emulation work.
2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>>:
There does not appear to be a default property, like an array to put the 'children' in. I think it just creates the children as instances and makes sure they have id properties on the mxml-generated subclass that the instances are assigned to.
The services are then identified and categorised by iterating the accessors of the ServiceLocator subclass via reflection and checking their types and then registering them.
Although it is and mxml instance of ServiceLocator, it is also an enforced singleton which is accessed elsewhere from code. At least that is how it appears to be set up to me.
I already took a look at the code and have made (not many) local changes and have the Cairngorm swc compiling via maven for both js and swf. I have not tested it. Things like weak event listeners are gone.
The main issue I think will be the Event.ADDED and Event.REMOVED for ViewHelper automated register/unregister. Maybe we can have a CaingormViewBase class with support for these, or perhaps we can use the ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might be all that is needed, but it may not always work the same.
I'll try to tidy it up and share it tomorrow. The licence is BSD and is permissive (https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390899554&sdata=bgcBkFJNdbJ3J%2BqiPmrcNDOPSDrM%2Bl45ekrJY%2BG%2Blm4%3D&reserved=0>) - It seems to be to be similar to others like MIT etc, but I don't know specifically what the rules are for Apache with that licence (in terms of possibility to include in Royale itself).
On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>> wrote:
Alex :
In flex use the swc. I am seeing the same thing that you are commenting, I do not understand where it assigns the remote objects to the ServiceLocator. This would have to be added to the "services" attribute of the RemoteObjects class. I will try to assign by code without using the mxml to see if it does not generate the error "null0".
El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>>) escribió:
I grabbed ServiceLocator.as and was able to produce the null0 problem, but the cause is that ServiceLocator does not have a default property. Did your MXML work in Flex? What ServiceLocator property would be assigned the mx:RemoteObject?
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 12:00 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
I download https://sourceforge.net/adobe/cairngorm/code/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Gc4%2FtARZq7gGGanmKlHKBRfGGAoA7BCvlhQYI5CcnMs%3D&reserved=0>, and change.
import flash.utils.describeType;
--> import org.apache.royale.reflection.describeType;
import flash.utils.Dictionary;
--> import org.apache.royale.utils.ObjectMap;
And this method
/**
* Return all the accessors on this object.
* @param serviceLocator the IServiceLocator instance.
* @return this object's accessors.
*/
protected
function getAccessors(
serviceLocator : IServiceLocator ) :
XMLList
{
/*
var description : XML = describeType( serviceLocator );
var accessors : XMLList = description.accessor.( @access == "readwrite" ).@name;
return accessors;
*/
return describeType( serviceLocator).accessors(@access ==
"readwrite" ).@name;
}
El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>>) escribió:
Carlos, What Flash APIs is Cairngorm dependent on?
-Alex
From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 10:05 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Hi,
Cairngorm depends on Flash APIs, so make a Royale migration could be not easy, or requires some expertise.
You can use Crux instead that has support for Cairngorm style Commands. Crux is the same as Swiz Framework for Flex but rewritten to work in Royale, and supports much more like dependency injection, Inversion of control, event handling, ...
You have 3 examples in the examples/crux folder you can check.
I recommend you Crux over Cairngorm since Swiz was born to substitute Cairngorm
El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<gu...@gmail.com>>) escribió:
Alex
<version>0.9.7-SNAPSHOT</version>
Thank
El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>>) escribió:
What version of the compiler are you using?
What does the ServiceLocator source look like? It might be an issue with defaultProperties for non-DOM objects.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 7:35 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the construction of the ServiceLocator, I understand that it is an error of the MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
1. CODE
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390909515&sdata=Tk8Pj%2F2DIb2xkXZ0mVPc5n4ZB6k%2FzSR2QERtGHMtnRQ%3D&reserved=0>"
xmlns:mx="library://ns.apache.org/royale/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=b28A5VvEoq7nU%2F4YvSXE6Lk2PTjKIDEehzOoNPSmj%2Fk%3D&reserved=0>"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject
id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
2. LINE OF ERROR (RED)
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray (MXMLDataInterpreter.js:126)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances (MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement (UIBase.js:402)
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390919472&sdata=fJXMZ6bipo5Lb9NGlxNZ5kCL89t5xVomfwABNLngzMs%3D&reserved=0>
--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C707a97326caa408ce15e08d7abbf0ebb%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166709390929426&sdata=uj3muDWmQFOheOtB05JV2M%2FG3l5NuevazrXlP38S%2B1w%3D&reserved=0>
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Hi, yesterday I tried with the change of Alex, from the royale-compiler
without success, the "null0" continues. I don't know if I missed a step.
I rebuilt with the royale-compiler project "mvn clean install" and tried
again the compilation of my project.
On the other hand I am seeing to create a Test in the project, but I see
that they are not running the tests of the package "royale-compiler \
compiler-jx \ src \ test \ java \ org \ apache \ royale \ compiler \
internal \ codegen \ mxml \ ...", do you know why?
Thanks.
Gustavo.
El vie., 7 feb. 2020 a las 4:21, Greg Dove (<gr...@gmail.com>) escribió:
>
> I'll try to get an minimal example working over my weekend sometime to
> test what I have. I made a quick start on that, just to get something that
> compiles. Once I see that it seems to be working I will release to git repo
> for the port.
> If you do want to try a different swc from what you already have, you
> could try one now from builds here I think:
>
> https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
>
> (I will remove that link in some days once the port is more thoroughly
> tested and available to all)
>
> I was able to inspect and verify that the js build had a ServicesLocator
> (as defined in that swc) mxml subclass which was populating correctly with
> the recent compiler changes from Alex, but I am not yet able to test more
> thoroughly. The view support probably won't work yet because there are no
> 'added' and 'removed' events, but we will figure something out.
>
>
>
>
> On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>
>>
>> Alex, I tested this change today. There is more to it than that, it
>> seems. I will discuss details in dev list.
>>
>>
>> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>>
>>> royale-compiler
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>> Sorry Alex, what repository is that of the push ?
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> I just pushed a change to the compiler. It should now have valid output
>>> for ServiceLocator.
>>>
>>>
>>>
>>> The compiler change was interesting in that I changed an else clause
>>> that was put in to handle instances specified as children of top tags but
>>> was doing the wrong thing. All of the compiler tests passed, but never hit
>>> that code so none of our tests actually used that code, even though the
>>> commit log implied it was for one of the tests. Either I made the earlier
>>> change to propagate the fix for plain properties to instances or there is
>>> some other scenario for instances as children (without a default property)
>>> that I am not thinking of.
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>> Exactly, cairmgorm, as Carlos says, is not the best option, but we save
>>> a lot of time in migrations where they use it and leave more time for other
>>> questions.
>>>
>>> i will continue to test how to fill that array today.
>>>
>>> Thank you very much for everyone in this collaboration.
>>>
>>>
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
>>> escribió:
>>>
>>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
>>> :)
>>>
>>>
>>>
>>> I know Cairngorm could be good for people wanting to migrate with the
>>> less effort possible. Anyway, I recommend, if possible to try to switch to
>>> Crux. We already did that several years ago in Flex, since all DI, IOC
>>> stuff, make us be more efficient and increase options. For people creating
>>> new apps, for me there's no doubt, for people migrating, should contemplate
>>> the Crux option if they continue evolving the app with new features...
>>>
>>>
>>>
>>> just my 2 :)
>>>
>>>
>>>
>>> Carlos
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
>>> escribió:
>>>
>>> Greg, thanks for your clarification. Anyway, it is a great work.
>>> Carlos, thanks all the times.^_^
>>>
>>>
>>>
>>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>>
>>>
>>>
>>> Hi Takeshita,
>>>
>>>
>>>
>>> Yes I think a few people have asked for Cairngorm or expressed interest
>>> in it. Given the choice, I personally think Crux will be a more
>>> modern/better option, but like I said, more people are asking for Cairngorm
>>> now, so probably it makes sense to port that too.
>>>
>>>
>>>
>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>> well for you. Please report any issues if you see them.
>>>
>>>
>>>
>>> One small thing: I definitely understand that you were referring to the
>>> work I did on porting it to Royale, but just for the sake of anyone else
>>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>>> from Swiz, and credit for the awesome features it has rests with the
>>> original authors of Swiz (I was in contact with the original developer
>>> during my efforts to port it to Royale).
>>>
>>> Also, just so people are aware, Carlos sponsored the majority of my work
>>> on porting that, so you really have Carlos to thank for that.
>>>
>>>
>>>
>>> cheers,
>>>
>>> Greg
>>>
>>>
>>>
>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>> wrote:
>>>
>>> Greg,
>>>
>>>
>>>
>>> Thanks for your work. We already have your Crux framework replacing
>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>> plenty of time of emulation work.
>>>
>>>
>>>
>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>
>>>
>>> There does not appear to be a default property, like an array to put the
>>> 'children' in. I think it just creates the children as instances and makes
>>> sure they have id properties on the mxml-generated subclass that the
>>> instances are assigned to.
>>>
>>>
>>>
>>> The services are then identified and categorised by iterating the
>>> accessors of the ServiceLocator subclass via reflection and checking their
>>> types and then registering them.
>>>
>>> Although it is and mxml instance of ServiceLocator, it is also an
>>> enforced singleton which is accessed elsewhere from code. At least that is
>>> how it appears to be set up to me.
>>>
>>>
>>>
>>> I already took a look at the code and have made (not many) local changes
>>> and have the Cairngorm swc compiling via maven for both js and swf. I have
>>> not tested it. Things like weak event listeners are gone.
>>>
>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>> ViewHelper automated register/unregister. Maybe we can have a
>>> CaingormViewBase class with support for these, or perhaps we can use the
>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>> be all that is needed, but it may not always work the same.
>>>
>>>
>>>
>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>>> permissive (
>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400608747&sdata=7y4FI%2BvBGn%2FlwLCr3zdfOzK0%2FG04kKfIceQxatTQ15Q%3D&reserved=0>) -
>>> It seems to be to be similar to others like MIT etc, but I don't know
>>> specifically what the rules are for Apache with that licence (in terms of
>>> possibility to include in Royale itself).
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>> gustavodecarli@gmail.com> wrote:
>>>
>>> Alex :
>>>
>>>
>>> In flex use the swc. I am seeing the same thing that you are commenting,
>>> I do not understand where it assigns the remote objects to the
>>> ServiceLocator. This would have to be added to the "services" attribute of
>>> the RemoteObjects class. I will try to assign by code without using the
>>> mxml to see if it does not generate the error "null0".
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>> but the cause is that ServiceLocator does not have a default property. Did
>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>> mx:RemoteObject?
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400608747&sdata=xTeCqCaR2f41uYLLsRBMgOGqUsFsFVZ0p7K1uHQ4b5Q%3D&reserved=0>,
>>> and change.
>>>
>>>
>>>
>>> import flash.utils.describeType;
>>>
>>> --> import org.apache.royale.reflection.describeType;
>>>
>>> import flash.utils.Dictionary;
>>>
>>> --> import org.apache.royale.utils.ObjectMap;
>>>
>>>
>>>
>>> And this method
>>>
>>>
>>>
>>>
>>>
>>> /**
>>>
>>>
>>>
>>> * Return all the accessors on this object.
>>>
>>>
>>>
>>> * @param serviceLocator the IServiceLocator instance.
>>>
>>>
>>>
>>> * @return this object's accessors.
>>>
>>>
>>>
>>> */
>>>
>>>
>>>
>>> protected
>>>
>>> function getAccessors(
>>>
>>> serviceLocator : IServiceLocator ) :
>>>
>>> XMLList
>>>
>>>
>>>
>>> {
>>>
>>>
>>>
>>> /*
>>>
>>>
>>>
>>> var description : XML = describeType( serviceLocator );
>>>
>>>
>>>
>>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>>> ).@name;
>>>
>>>
>>>
>>>
>>>
>>> return accessors;
>>>
>>>
>>>
>>> */
>>>
>>>
>>>
>>>
>>>
>>> return describeType( serviceLocator).accessors(@access ==
>>>
>>> "readwrite" ).@name;
>>>
>>>
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *Carlos Rovira <ca...@apache.org>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>>> easy, or requires some expertise.
>>>
>>> You can use Crux instead that has support for Cairngorm style Commands.
>>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>>> Royale, and supports much more like dependency injection, Inversion of
>>> control, event handling, ...
>>>
>>> You have 3 examples in the examples/crux folder you can check.
>>>
>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>> Cairngorm
>>>
>>>
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>> gustavodecarli@gmail.com>) escribió:
>>>
>>> Alex
>>>
>>>
>>>
>>> <version>0.9.7-SNAPSHOT</version>
>>>
>>>
>>>
>>> Thank
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> What version of the compiler are you using?
>>>
>>>
>>>
>>> What does the ServiceLocator source look like? It might be an issue
>>> with defaultProperties for non-DOM objects.
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>>
>>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>>> the construction of the ServiceLocator, I understand that it is an error of
>>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>
>>> Thank
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> *1. CODE *
>>>
>>>
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>>
>>>
>>>
>>> <cairngorm:ServiceLocator
>>>
>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400618703&sdata=jEYBHjnS%2BvazCk42nCf3UnZSneKBB0PEfnXzv8XVX54%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:mx="library://ns.apache.org/royale/mx
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400618703&sdata=LeacGlrWkh6ciIouAWJAt%2B%2Fe37otIpVutcpYiQ7odzQ%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>
>>>
>>>
>>>
>>>
>>> <mx:RemoteObject
>>>
>>> id="srvSeguridades"
>>>
>>>
>>>
>>> destination="seguridades"
>>>
>>>
>>>
>>> result="event.token.resultHandler(event)"
>>>
>>>
>>>
>>> fault="event.token.faultHandler(event)"
>>>
>>>
>>>
>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>
>>>
>>>
>>>
>>>
>>> </cairngorm:ServiceLocator>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *2. LINE OF ERROR (RED)*
>>>
>>> /
>>>
>>>
>>>
>>> **
>>> * @constructor
>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>> */
>>> services.Servicio = function() {
>>> services.Servicio.base(this, 'constructor');
>>>
>>> /**
>>> * @private
>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>> */
>>> this.srvSeguridades_;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldd;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldp;
>>>
>>> this.generateMXMLAttributes
>>> ([1,
>>> mx.rpc.remoting.mxml.RemoteObject,
>>> 3,
>>> 'id',
>>> true,
>>> 'srvSeguridades',
>>> 'destination',
>>> true,
>>> 'seguridades',
>>> 'endpoint',
>>> true,
>>> 'http://localhost:8080/messagebroker/amf',
>>> 0,
>>> 2,
>>> 'result',
>>> this.$EH0,
>>> 'fault',
>>> this.$EH1,
>>> null0, <- ERROR
>>> 0
>>> ]);
>>>
>>> };
>>>
>>>
>>>
>>>
>>>
>>> 3. Trace console log
>>>
>>>
>>>
>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>> at new services.Servicio (Servicio.js:61)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>> (MXMLDataInterpreter.js:126)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>> (MXMLDataInterpreter.js:271)
>>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>> at
>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>> (UIBase.js:402)
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Carlos Rovira
>>>
>>> http://about.me/carlosrovira
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400628660&sdata=DP9xP4cvH8WfMVnahVfGrq9FfWU3ZaRDCdPVRzvefXo%3D&reserved=0>
>>>
>>>
>>>
>>> --
>>>
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>>
>>> --
>>>
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Carlos Rovira
>>>
>>> http://about.me/carlosrovira
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400628660&sdata=DP9xP4cvH8WfMVnahVfGrq9FfWU3ZaRDCdPVRzvefXo%3D&reserved=0>
>>>
>>>
>>>
>>>
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
I'll try to get an minimal example working over my weekend sometime to test
what I have. I made a quick start on that, just to get something that
compiles. Once I see that it seems to be working I will release to git repo
for the port.
If you do want to try a different swc from what you already have, you could
try one now from builds here I think:
https://www.dropbox.com/sh/xk8aui9ghy30mid/AAAAx0LUpfjXEQWC221zAjTza?dl=0
(I will remove that link in some days once the port is more thoroughly
tested and available to all)
I was able to inspect and verify that the js build had a ServicesLocator
(as defined in that swc) mxml subclass which was populating correctly with
the recent compiler changes from Alex, but I am not yet able to test more
thoroughly. The view support probably won't work yet because there are no
'added' and 'removed' events, but we will figure something out.
On Fri, Feb 7, 2020 at 6:23 PM Greg Dove <gr...@gmail.com> wrote:
>
> Alex, I tested this change today. There is more to it than that, it seems.
> I will discuss details in dev list.
>
>
> On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
>
>> royale-compiler
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Thursday, February 6, 2020 at 11:39 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>> Sorry Alex, what repository is that of the push ?
>>
>>
>>
>> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> I just pushed a change to the compiler. It should now have valid output
>> for ServiceLocator.
>>
>>
>>
>> The compiler change was interesting in that I changed an else clause that
>> was put in to handle instances specified as children of top tags but was
>> doing the wrong thing. All of the compiler tests passed, but never hit
>> that code so none of our tests actually used that code, even though the
>> commit log implied it was for one of the tests. Either I made the earlier
>> change to propagate the fix for plain properties to instances or there is
>> some other scenario for instances as children (without a default property)
>> that I am not thinking of.
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Thursday, February 6, 2020 at 6:03 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>> Exactly, cairmgorm, as Carlos says, is not the best option, but we save a
>> lot of time in migrations where they use it and leave more time for other
>> questions.
>>
>> i will continue to test how to fill that array today.
>>
>> Thank you very much for everyone in this collaboration.
>>
>>
>>
>> Gustavo.
>>
>>
>>
>> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
>> escribió:
>>
>> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
>> :)
>>
>>
>>
>> I know Cairngorm could be good for people wanting to migrate with the
>> less effort possible. Anyway, I recommend, if possible to try to switch to
>> Crux. We already did that several years ago in Flex, since all DI, IOC
>> stuff, make us be more efficient and increase options. For people creating
>> new apps, for me there's no doubt, for people migrating, should contemplate
>> the Crux option if they continue evolving the app with new features...
>>
>>
>>
>> just my 2 :)
>>
>>
>>
>> Carlos
>>
>>
>>
>>
>>
>>
>>
>> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
>> escribió:
>>
>> Greg, thanks for your clarification. Anyway, it is a great work.
>> Carlos, thanks all the times.^_^
>>
>>
>>
>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>
>>
>>
>> Hi Takeshita,
>>
>>
>>
>> Yes I think a few people have asked for Cairngorm or expressed interest
>> in it. Given the choice, I personally think Crux will be a more
>> modern/better option, but like I said, more people are asking for Cairngorm
>> now, so probably it makes sense to port that too.
>>
>>
>>
>> I'm also pleased to hear that you are using Crux, I hope it's working
>> well for you. Please report any issues if you see them.
>>
>>
>>
>> One small thing: I definitely understand that you were referring to the
>> work I did on porting it to Royale, but just for the sake of anyone else
>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>> from Swiz, and credit for the awesome features it has rests with the
>> original authors of Swiz (I was in contact with the original developer
>> during my efforts to port it to Royale).
>>
>> Also, just so people are aware, Carlos sponsored the majority of my work
>> on porting that, so you really have Carlos to thank for that.
>>
>>
>>
>> cheers,
>>
>> Greg
>>
>>
>>
>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>> wrote:
>>
>> Greg,
>>
>>
>>
>> Thanks for your work. We already have your Crux framework replacing
>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>> plenty of time of emulation work.
>>
>>
>>
>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>
>>
>> There does not appear to be a default property, like an array to put the
>> 'children' in. I think it just creates the children as instances and makes
>> sure they have id properties on the mxml-generated subclass that the
>> instances are assigned to.
>>
>>
>>
>> The services are then identified and categorised by iterating the
>> accessors of the ServiceLocator subclass via reflection and checking their
>> types and then registering them.
>>
>> Although it is and mxml instance of ServiceLocator, it is also an
>> enforced singleton which is accessed elsewhere from code. At least that is
>> how it appears to be set up to me.
>>
>>
>>
>> I already took a look at the code and have made (not many) local changes
>> and have the Cairngorm swc compiling via maven for both js and swf. I have
>> not tested it. Things like weak event listeners are gone.
>>
>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>> ViewHelper automated register/unregister. Maybe we can have a
>> CaingormViewBase class with support for these, or perhaps we can use the
>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>> be all that is needed, but it may not always work the same.
>>
>>
>>
>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>> permissive (
>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400608747&sdata=7y4FI%2BvBGn%2FlwLCr3zdfOzK0%2FG04kKfIceQxatTQ15Q%3D&reserved=0>) -
>> It seems to be to be similar to others like MIT etc, but I don't know
>> specifically what the rules are for Apache with that licence (in terms of
>> possibility to include in Royale itself).
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
>> wrote:
>>
>> Alex :
>>
>>
>> In flex use the swc. I am seeing the same thing that you are commenting,
>> I do not understand where it assigns the remote objects to the
>> ServiceLocator. This would have to be added to the "services" attribute of
>> the RemoteObjects class. I will try to assign by code without using the
>> mxml to see if it does not generate the error "null0".
>>
>>
>>
>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>> but the cause is that ServiceLocator does not have a default property. Did
>> your MXML work in Flex? What ServiceLocator property would be assigned the
>> mx:RemoteObject?
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>> I download https://sourceforge.net/adobe/cairngorm/code/
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400608747&sdata=xTeCqCaR2f41uYLLsRBMgOGqUsFsFVZ0p7K1uHQ4b5Q%3D&reserved=0>,
>> and change.
>>
>>
>>
>> import flash.utils.describeType;
>>
>> --> import org.apache.royale.reflection.describeType;
>>
>> import flash.utils.Dictionary;
>>
>> --> import org.apache.royale.utils.ObjectMap;
>>
>>
>>
>> And this method
>>
>>
>>
>>
>>
>> /**
>>
>>
>>
>> * Return all the accessors on this object.
>>
>>
>>
>> * @param serviceLocator the IServiceLocator instance.
>>
>>
>>
>> * @return this object's accessors.
>>
>>
>>
>> */
>>
>>
>>
>> protected
>>
>> function getAccessors(
>>
>> serviceLocator : IServiceLocator ) :
>>
>> XMLList
>>
>>
>>
>> {
>>
>>
>>
>> /*
>>
>>
>>
>> var description : XML = describeType( serviceLocator );
>>
>>
>>
>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>> ).@name;
>>
>>
>>
>>
>>
>> return accessors;
>>
>>
>>
>> */
>>
>>
>>
>>
>>
>> return describeType( serviceLocator).accessors(@access ==
>>
>> "readwrite" ).@name;
>>
>>
>>
>> }
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> Carlos, What Flash APIs is Cairngorm dependent on?
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *Carlos Rovira <ca...@apache.org>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>> Hi,
>>
>>
>>
>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>> easy, or requires some expertise.
>>
>> You can use Crux instead that has support for Cairngorm style Commands.
>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>> Royale, and supports much more like dependency injection, Inversion of
>> control, event handling, ...
>>
>> You have 3 examples in the examples/crux folder you can check.
>>
>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>> Cairngorm
>>
>>
>>
>>
>>
>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>> gustavodecarli@gmail.com>) escribió:
>>
>> Alex
>>
>>
>>
>> <version>0.9.7-SNAPSHOT</version>
>>
>>
>>
>> Thank
>>
>>
>>
>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> What version of the compiler are you using?
>>
>>
>>
>> What does the ServiceLocator source look like? It might be an issue with
>> defaultProperties for non-DOM objects.
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>>
>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>> the construction of the ServiceLocator, I understand that it is an error of
>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>
>> Thank
>>
>> Gustavo.
>>
>>
>>
>> *1. CODE *
>>
>>
>>
>>
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>
>>
>>
>> <cairngorm:ServiceLocator
>>
>> xmlns:fx="http://ns.adobe.com/mxml/2009
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400618703&sdata=jEYBHjnS%2BvazCk42nCf3UnZSneKBB0PEfnXzv8XVX54%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:mx="library://ns.apache.org/royale/mx
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400618703&sdata=LeacGlrWkh6ciIouAWJAt%2B%2Fe37otIpVutcpYiQ7odzQ%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>
>>
>>
>>
>>
>> <mx:RemoteObject
>>
>> id="srvSeguridades"
>>
>>
>>
>> destination="seguridades"
>>
>>
>>
>> result="event.token.resultHandler(event)"
>>
>>
>>
>> fault="event.token.faultHandler(event)"
>>
>>
>>
>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>
>>
>>
>>
>>
>> </cairngorm:ServiceLocator>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *2. LINE OF ERROR (RED)*
>>
>> /
>>
>>
>>
>> **
>> * @constructor
>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>> */
>> services.Servicio = function() {
>> services.Servicio.base(this, 'constructor');
>>
>> /**
>> * @private
>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>> */
>> this.srvSeguridades_;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldd;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldp;
>>
>> this.generateMXMLAttributes
>> ([1,
>> mx.rpc.remoting.mxml.RemoteObject,
>> 3,
>> 'id',
>> true,
>> 'srvSeguridades',
>> 'destination',
>> true,
>> 'seguridades',
>> 'endpoint',
>> true,
>> 'http://localhost:8080/messagebroker/amf',
>> 0,
>> 2,
>> 'result',
>> this.$EH0,
>> 'fault',
>> this.$EH1,
>> null0, <- ERROR
>> 0
>> ]);
>>
>> };
>>
>>
>>
>>
>>
>> 3. Trace console log
>>
>>
>>
>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>> at new services.Servicio (Servicio.js:61)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>> (MXMLDataInterpreter.js:126)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>> (MXMLDataInterpreter.js:271)
>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>> at
>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>> (UIBase.js:402)
>>
>>
>>
>>
>> --
>>
>> Carlos Rovira
>>
>> http://about.me/carlosrovira
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400628660&sdata=DP9xP4cvH8WfMVnahVfGrq9FfWU3ZaRDCdPVRzvefXo%3D&reserved=0>
>>
>>
>>
>> --
>>
>> Shoichiro Takeshita
>> 武下 祥一郎
>>
>> --
>>
>> Shoichiro Takeshita
>> 武下 祥一郎
>>
>>
>>
>>
>> --
>>
>> Carlos Rovira
>>
>> http://about.me/carlosrovira
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400628660&sdata=DP9xP4cvH8WfMVnahVfGrq9FfWU3ZaRDCdPVRzvefXo%3D&reserved=0>
>>
>>
>>
>>
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
Alex, I tested this change today. There is more to it than that, it seems.
I will discuss details in dev list.
On Fri, Feb 7, 2020 at 8:40 AM Alex Harui <ah...@adobe.com> wrote:
> royale-compiler
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, February 6, 2020 at 11:39 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Sorry Alex, what repository is that of the push ?
>
>
>
> El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> I just pushed a change to the compiler. It should now have valid output
> for ServiceLocator.
>
>
>
> The compiler change was interesting in that I changed an else clause that
> was put in to handle instances specified as children of top tags but was
> doing the wrong thing. All of the compiler tests passed, but never hit
> that code so none of our tests actually used that code, even though the
> commit log implied it was for one of the tests. Either I made the earlier
> change to propagate the fix for plain properties to instances or there is
> some other scenario for instances as children (without a default property)
> that I am not thinking of.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, February 6, 2020 at 6:03 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
> Exactly, cairmgorm, as Carlos says, is not the best option, but we save a
> lot of time in migrations where they use it and leave more time for other
> questions.
>
> i will continue to test how to fill that array today.
>
> Thank you very much for everyone in this collaboration.
>
>
>
> Gustavo.
>
>
>
> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
> :)
>
>
>
> I know Cairngorm could be good for people wanting to migrate with the less
> effort possible. Anyway, I recommend, if possible to try to switch to Crux.
> We already did that several years ago in Flex, since all DI, IOC stuff,
> make us be more efficient and increase options. For people creating new
> apps, for me there's no doubt, for people migrating, should contemplate the
> Crux option if they continue evolving the app with new features...
>
>
>
> just my 2 :)
>
>
>
> Carlos
>
>
>
>
>
>
>
> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
> escribió:
>
> Greg, thanks for your clarification. Anyway, it is a great work.
> Carlos, thanks all the times.^_^
>
>
>
> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>
>
>
> Hi Takeshita,
>
>
>
> Yes I think a few people have asked for Cairngorm or expressed interest in
> it. Given the choice, I personally think Crux will be a more modern/better
> option, but like I said, more people are asking for Cairngorm now, so
> probably it makes sense to port that too.
>
>
>
> I'm also pleased to hear that you are using Crux, I hope it's working well
> for you. Please report any issues if you see them.
>
>
>
> One small thing: I definitely understand that you were referring to the
> work I did on porting it to Royale, but just for the sake of anyone else
> who reads this: it's definitely not 'my Crux framework'. The code is ported
> from Swiz, and credit for the awesome features it has rests with the
> original authors of Swiz (I was in contact with the original developer
> during my efforts to port it to Royale).
>
> Also, just so people are aware, Carlos sponsored the majority of my work
> on porting that, so you really have Carlos to thank for that.
>
>
>
> cheers,
>
> Greg
>
>
>
> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
> wrote:
>
> Greg,
>
>
>
> Thanks for your work. We already have your Crux framework replacing
> Cairngorm, it is great if Cairngorm works with Royale. It will save a
> plenty of time of emulation work.
>
>
>
> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>
>
> There does not appear to be a default property, like an array to put the
> 'children' in. I think it just creates the children as instances and makes
> sure they have id properties on the mxml-generated subclass that the
> instances are assigned to.
>
>
>
> The services are then identified and categorised by iterating the
> accessors of the ServiceLocator subclass via reflection and checking their
> types and then registering them.
>
> Although it is and mxml instance of ServiceLocator, it is also an enforced
> singleton which is accessed elsewhere from code. At least that is how it
> appears to be set up to me.
>
>
>
> I already took a look at the code and have made (not many) local changes
> and have the Cairngorm swc compiling via maven for both js and swf. I have
> not tested it. Things like weak event listeners are gone.
>
> The main issue I think will be the Event.ADDED and Event.REMOVED for
> ViewHelper automated register/unregister. Maybe we can have a
> CaingormViewBase class with support for these, or perhaps we can use the
> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
> be all that is needed, but it may not always work the same.
>
>
>
> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
> permissive (
> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400608747&sdata=7y4FI%2BvBGn%2FlwLCr3zdfOzK0%2FG04kKfIceQxatTQ15Q%3D&reserved=0>) -
> It seems to be to be similar to others like MIT etc, but I don't know
> specifically what the rules are for Apache with that licence (in terms of
> possibility to include in Royale itself).
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
> Alex :
>
>
> In flex use the swc. I am seeing the same thing that you are commenting, I
> do not understand where it assigns the remote objects to the
> ServiceLocator. This would have to be added to the "services" attribute of
> the RemoteObjects class. I will try to assign by code without using the
> mxml to see if it does not generate the error "null0".
>
>
>
> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> I grabbed ServiceLocator.as and was able to produce the null0 problem, but
> the cause is that ServiceLocator does not have a default property. Did
> your MXML work in Flex? What ServiceLocator property would be assigned the
> mx:RemoteObject?
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 12:00 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
>
> I download https://sourceforge.net/adobe/cairngorm/code/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400608747&sdata=xTeCqCaR2f41uYLLsRBMgOGqUsFsFVZ0p7K1uHQ4b5Q%3D&reserved=0>,
> and change.
>
>
>
> import flash.utils.describeType;
>
> --> import org.apache.royale.reflection.describeType;
>
> import flash.utils.Dictionary;
>
> --> import org.apache.royale.utils.ObjectMap;
>
>
>
> And this method
>
>
>
>
>
> /**
>
>
>
> * Return all the accessors on this object.
>
>
>
> * @param serviceLocator the IServiceLocator instance.
>
>
>
> * @return this object's accessors.
>
>
>
> */
>
>
>
> protected
>
> function getAccessors(
>
> serviceLocator : IServiceLocator ) :
>
> XMLList
>
>
>
> {
>
>
>
> /*
>
>
>
> var description : XML = describeType( serviceLocator );
>
>
>
> var accessors : XMLList = description.accessor.( @access == "readwrite"
> ).@name;
>
>
>
>
>
> return accessors;
>
>
>
> */
>
>
>
>
>
> return describeType( serviceLocator).accessors(@access ==
>
> "readwrite" ).@name;
>
>
>
> }
>
>
>
>
>
>
>
>
>
> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> Carlos, What Flash APIs is Cairngorm dependent on?
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Hi,
>
>
>
> Cairngorm depends on Flash APIs, so make a Royale migration could be not
> easy, or requires some expertise.
>
> You can use Crux instead that has support for Cairngorm style Commands.
> Crux is the same as Swiz Framework for Flex but rewritten to work in
> Royale, and supports much more like dependency injection, Inversion of
> control, event handling, ...
>
> You have 3 examples in the examples/crux folder you can check.
>
> I recommend you Crux over Cairngorm since Swiz was born to substitute
> Cairngorm
>
>
>
>
>
> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
> gustavodecarli@gmail.com>) escribió:
>
> Alex
>
>
>
> <version>0.9.7-SNAPSHOT</version>
>
>
>
> Thank
>
>
>
> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> What version of the compiler are you using?
>
>
>
> What does the ServiceLocator source look like? It might be an issue with
> defaultProperties for non-DOM objects.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 7:35 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Cairngorm problem add remote object MXML.
>
>
>
>
>
>
> I am trying to transcribe gairngorm, at runtime it gives me an error in
> the construction of the ServiceLocator, I understand that it is an error of
> the MXMLDataInterpreter. Anyone have any idea of the problem.
>
> Thank
>
> Gustavo.
>
>
>
> *1. CODE *
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <cairngorm:ServiceLocator
>
> xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400618703&sdata=jEYBHjnS%2BvazCk42nCf3UnZSneKBB0PEfnXzv8XVX54%3D&reserved=0>
> "
>
>
>
> xmlns:mx="library://ns.apache.org/royale/mx
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400618703&sdata=LeacGlrWkh6ciIouAWJAt%2B%2Fe37otIpVutcpYiQ7odzQ%3D&reserved=0>
> "
>
>
>
> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>
>
>
>
>
> <mx:RemoteObject
>
> id="srvSeguridades"
>
>
>
> destination="seguridades"
>
>
>
> result="event.token.resultHandler(event)"
>
>
>
> fault="event.token.faultHandler(event)"
>
>
>
> endpoint="http://localhost:8080/messagebroker/amf"/>
>
>
>
>
>
> </cairngorm:ServiceLocator>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *2. LINE OF ERROR (RED)*
>
> /
>
>
>
> **
> * @constructor
> * @extends {com.adobe.cairngorm.business.ServiceLocator}
> */
> services.Servicio = function() {
> services.Servicio.base(this, 'constructor');
>
> /**
> * @private
> * @type {mx.rpc.remoting.mxml.RemoteObject}
> */
> this.srvSeguridades_;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldd;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldp;
>
> this.generateMXMLAttributes
> ([1,
> mx.rpc.remoting.mxml.RemoteObject,
> 3,
> 'id',
> true,
> 'srvSeguridades',
> 'destination',
> true,
> 'seguridades',
> 'endpoint',
> true,
> 'http://localhost:8080/messagebroker/amf',
> 0,
> 2,
> 'result',
> this.$EH0,
> 'fault',
> this.$EH1,
> null0, <- ERROR
> 0
> ]);
>
> };
>
>
>
>
>
> 3. Trace console log
>
>
>
> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
> at new services.Servicio (Servicio.js:61)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
> (MXMLDataInterpreter.js:126)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
> (MXMLDataInterpreter.js:271)
> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
> at main.Main.mx.core.Container.createChildren (Container.js:136)
> at main.Main.mx.core.Application.createChildren (Application.js:122)
> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
> at main.Main.mx.core.Container.addedToParent (Container.js:123)
> at
> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
> (UIBase.js:402)
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400628660&sdata=DP9xP4cvH8WfMVnahVfGrq9FfWU3ZaRDCdPVRzvefXo%3D&reserved=0>
>
>
>
> --
>
> Shoichiro Takeshita
> 武下 祥一郎
>
> --
>
> Shoichiro Takeshita
> 武下 祥一郎
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400628660&sdata=DP9xP4cvH8WfMVnahVfGrq9FfWU3ZaRDCdPVRzvefXo%3D&reserved=0>
>
>
>
>
Re: Cairngorm problem add remote object MXML.
Posted by Alex Harui <ah...@adobe.com>.
royale-compiler
From: De Carli Gustavo <gu...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Thursday, February 6, 2020 at 11:39 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Cairngorm problem add remote object MXML.
Sorry Alex, what repository is that of the push ?
El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>>) escribió:
I just pushed a change to the compiler. It should now have valid output for ServiceLocator.
The compiler change was interesting in that I changed an else clause that was put in to handle instances specified as children of top tags but was doing the wrong thing. All of the compiler tests passed, but never hit that code so none of our tests actually used that code, even though the commit log implied it was for one of the tests. Either I made the earlier change to propagate the fix for plain properties to instances or there is some other scenario for instances as children (without a default property) that I am not thinking of.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Thursday, February 6, 2020 at 6:03 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Exactly, cairmgorm, as Carlos says, is not the best option, but we save a lot of time in migrations where they use it and leave more time for other questions.
i will continue to test how to fill that array today.
Thank you very much for everyone in this collaboration.
Gustavo.
El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>>) escribió:
Thanks Greg, for the sponsor credits, and thanks Takeshita for the words :)
I know Cairngorm could be good for people wanting to migrate with the less effort possible. Anyway, I recommend, if possible to try to switch to Crux. We already did that several years ago in Flex, since all DI, IOC stuff, make us be more efficient and increase options. For people creating new apps, for me there's no doubt, for people migrating, should contemplate the Crux option if they continue evolving the app with new features...
just my 2 :)
Carlos
El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>>) escribió:
Greg, thanks for your clarification. Anyway, it is a great work. Carlos, thanks all the times.^_^
2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>>:
Hi Takeshita,
Yes I think a few people have asked for Cairngorm or expressed interest in it. Given the choice, I personally think Crux will be a more modern/better option, but like I said, more people are asking for Cairngorm now, so probably it makes sense to port that too.
I'm also pleased to hear that you are using Crux, I hope it's working well for you. Please report any issues if you see them.
One small thing: I definitely understand that you were referring to the work I did on porting it to Royale, but just for the sake of anyone else who reads this: it's definitely not 'my Crux framework'. The code is ported from Swiz, and credit for the awesome features it has rests with the original authors of Swiz (I was in contact with the original developer during my efforts to port it to Royale).
Also, just so people are aware, Carlos sponsored the majority of my work on porting that, so you really have Carlos to thank for that.
cheers,
Greg
On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>> wrote:
Greg,
Thanks for your work. We already have your Crux framework replacing Cairngorm, it is great if Cairngorm works with Royale. It will save a plenty of time of emulation work.
2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>>:
There does not appear to be a default property, like an array to put the 'children' in. I think it just creates the children as instances and makes sure they have id properties on the mxml-generated subclass that the instances are assigned to.
The services are then identified and categorised by iterating the accessors of the ServiceLocator subclass via reflection and checking their types and then registering them.
Although it is and mxml instance of ServiceLocator, it is also an enforced singleton which is accessed elsewhere from code. At least that is how it appears to be set up to me.
I already took a look at the code and have made (not many) local changes and have the Cairngorm swc compiling via maven for both js and swf. I have not tested it. Things like weak event listeners are gone.
The main issue I think will be the Event.ADDED and Event.REMOVED for ViewHelper automated register/unregister. Maybe we can have a CaingormViewBase class with support for these, or perhaps we can use the ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might be all that is needed, but it may not always work the same.
I'll try to tidy it up and share it tomorrow. The licence is BSD and is permissive (https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400608747&sdata=7y4FI%2BvBGn%2FlwLCr3zdfOzK0%2FG04kKfIceQxatTQ15Q%3D&reserved=0>) - It seems to be to be similar to others like MIT etc, but I don't know specifically what the rules are for Apache with that licence (in terms of possibility to include in Royale itself).
On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>> wrote:
Alex :
In flex use the swc. I am seeing the same thing that you are commenting, I do not understand where it assigns the remote objects to the ServiceLocator. This would have to be added to the "services" attribute of the RemoteObjects class. I will try to assign by code without using the mxml to see if it does not generate the error "null0".
El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>>) escribió:
I grabbed ServiceLocator.as and was able to produce the null0 problem, but the cause is that ServiceLocator does not have a default property. Did your MXML work in Flex? What ServiceLocator property would be assigned the mx:RemoteObject?
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 12:00 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
I download https://sourceforge.net/adobe/cairngorm/code/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400608747&sdata=xTeCqCaR2f41uYLLsRBMgOGqUsFsFVZ0p7K1uHQ4b5Q%3D&reserved=0>, and change.
import flash.utils.describeType;
--> import org.apache.royale.reflection.describeType;
import flash.utils.Dictionary;
--> import org.apache.royale.utils.ObjectMap;
And this method
/**
* Return all the accessors on this object.
* @param serviceLocator the IServiceLocator instance.
* @return this object's accessors.
*/
protected
function getAccessors(
serviceLocator : IServiceLocator ) :
XMLList
{
/*
var description : XML = describeType( serviceLocator );
var accessors : XMLList = description.accessor.( @access == "readwrite" ).@name;
return accessors;
*/
return describeType( serviceLocator).accessors(@access ==
"readwrite" ).@name;
}
El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>>) escribió:
Carlos, What Flash APIs is Cairngorm dependent on?
-Alex
From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 10:05 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Hi,
Cairngorm depends on Flash APIs, so make a Royale migration could be not easy, or requires some expertise.
You can use Crux instead that has support for Cairngorm style Commands. Crux is the same as Swiz Framework for Flex but rewritten to work in Royale, and supports much more like dependency injection, Inversion of control, event handling, ...
You have 3 examples in the examples/crux folder you can check.
I recommend you Crux over Cairngorm since Swiz was born to substitute Cairngorm
El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<gu...@gmail.com>>) escribió:
Alex
<version>0.9.7-SNAPSHOT</version>
Thank
El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>>) escribió:
What version of the compiler are you using?
What does the ServiceLocator source look like? It might be an issue with defaultProperties for non-DOM objects.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 7:35 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the construction of the ServiceLocator, I understand that it is an error of the MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
1. CODE
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400618703&sdata=jEYBHjnS%2BvazCk42nCf3UnZSneKBB0PEfnXzv8XVX54%3D&reserved=0>"
xmlns:mx="library://ns.apache.org/royale/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400618703&sdata=LeacGlrWkh6ciIouAWJAt%2B%2Fe37otIpVutcpYiQ7odzQ%3D&reserved=0>"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject
id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
2. LINE OF ERROR (RED)
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray (MXMLDataInterpreter.js:126)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances (MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement (UIBase.js:402)
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400628660&sdata=DP9xP4cvH8WfMVnahVfGrq9FfWU3ZaRDCdPVRzvefXo%3D&reserved=0>
--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C1fd5f302a43c4e39e9d608d7ab3c3235%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637166147400628660&sdata=DP9xP4cvH8WfMVnahVfGrq9FfWU3ZaRDCdPVRzvefXo%3D&reserved=0>
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Sorry Alex, what repository is that of the push ?
El jue., 6 feb. 2020 a las 16:13, Alex Harui (<ah...@adobe.com>) escribió:
> I just pushed a change to the compiler. It should now have valid output
> for ServiceLocator.
>
>
>
> The compiler change was interesting in that I changed an else clause that
> was put in to handle instances specified as children of top tags but was
> doing the wrong thing. All of the compiler tests passed, but never hit
> that code so none of our tests actually used that code, even though the
> commit log implied it was for one of the tests. Either I made the earlier
> change to propagate the fix for plain properties to instances or there is
> some other scenario for instances as children (without a default property)
> that I am not thinking of.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Thursday, February 6, 2020 at 6:03 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
> Exactly, cairmgorm, as Carlos says, is not the best option, but we save a
> lot of time in migrations where they use it and leave more time for other
> questions.
>
> i will continue to test how to fill that array today.
>
> Thank you very much for everyone in this collaboration.
>
>
>
> Gustavo.
>
>
>
> El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
> escribió:
>
> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words
> :)
>
>
>
> I know Cairngorm could be good for people wanting to migrate with the less
> effort possible. Anyway, I recommend, if possible to try to switch to Crux.
> We already did that several years ago in Flex, since all DI, IOC stuff,
> make us be more efficient and increase options. For people creating new
> apps, for me there's no doubt, for people migrating, should contemplate the
> Crux option if they continue evolving the app with new features...
>
>
>
> just my 2 :)
>
>
>
> Carlos
>
>
>
>
>
>
>
> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
> escribió:
>
> Greg, thanks for your clarification. Anyway, it is a great work.
> Carlos, thanks all the times.^_^
>
>
>
> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>
>
>
> Hi Takeshita,
>
>
>
> Yes I think a few people have asked for Cairngorm or expressed interest in
> it. Given the choice, I personally think Crux will be a more modern/better
> option, but like I said, more people are asking for Cairngorm now, so
> probably it makes sense to port that too.
>
>
>
> I'm also pleased to hear that you are using Crux, I hope it's working well
> for you. Please report any issues if you see them.
>
>
>
> One small thing: I definitely understand that you were referring to the
> work I did on porting it to Royale, but just for the sake of anyone else
> who reads this: it's definitely not 'my Crux framework'. The code is ported
> from Swiz, and credit for the awesome features it has rests with the
> original authors of Swiz (I was in contact with the original developer
> during my efforts to port it to Royale).
>
> Also, just so people are aware, Carlos sponsored the majority of my work
> on porting that, so you really have Carlos to thank for that.
>
>
>
> cheers,
>
> Greg
>
>
>
> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
> wrote:
>
> Greg,
>
>
>
> Thanks for your work. We already have your Crux framework replacing
> Cairngorm, it is great if Cairngorm works with Royale. It will save a
> plenty of time of emulation work.
>
>
>
> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>
>
> There does not appear to be a default property, like an array to put the
> 'children' in. I think it just creates the children as instances and makes
> sure they have id properties on the mxml-generated subclass that the
> instances are assigned to.
>
>
>
> The services are then identified and categorised by iterating the
> accessors of the ServiceLocator subclass via reflection and checking their
> types and then registering them.
>
> Although it is and mxml instance of ServiceLocator, it is also an enforced
> singleton which is accessed elsewhere from code. At least that is how it
> appears to be set up to me.
>
>
>
> I already took a look at the code and have made (not many) local changes
> and have the Cairngorm swc compiling via maven for both js and swf. I have
> not tested it. Things like weak event listeners are gone.
>
> The main issue I think will be the Event.ADDED and Event.REMOVED for
> ViewHelper automated register/unregister. Maybe we can have a
> CaingormViewBase class with support for these, or perhaps we can use the
> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
> be all that is needed, but it may not always work the same.
>
>
>
> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
> permissive (
> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137049095&sdata=8MGGGyFXPPsgG%2BdTxTWp7S7OtM6wd94xShq1VB4%2BD%2BA%3D&reserved=0>) -
> It seems to be to be similar to others like MIT etc, but I don't know
> specifically what the rules are for Apache with that licence (in terms of
> possibility to include in Royale itself).
>
>
>
>
>
>
>
>
>
>
>
> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
> Alex :
>
>
> In flex use the swc. I am seeing the same thing that you are commenting, I
> do not understand where it assigns the remote objects to the
> ServiceLocator. This would have to be added to the "services" attribute of
> the RemoteObjects class. I will try to assign by code without using the
> mxml to see if it does not generate the error "null0".
>
>
>
> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> I grabbed ServiceLocator.as and was able to produce the null0 problem, but
> the cause is that ServiceLocator does not have a default property. Did
> your MXML work in Flex? What ServiceLocator property would be assigned the
> mx:RemoteObject?
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 12:00 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
>
> I download https://sourceforge.net/adobe/cairngorm/code/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137059053&sdata=8YKHsj0ALwP0uj5inyyUHIx092KYsX%2FvDBxwR1r0UKM%3D&reserved=0>,
> and change.
>
>
>
> import flash.utils.describeType;
>
> --> import org.apache.royale.reflection.describeType;
>
> import flash.utils.Dictionary;
>
> --> import org.apache.royale.utils.ObjectMap;
>
>
>
> And this method
>
>
>
>
>
> /**
>
>
>
> * Return all the accessors on this object.
>
>
>
> * @param serviceLocator the IServiceLocator instance.
>
>
>
> * @return this object's accessors.
>
>
>
> */
>
>
>
> protected
>
> function getAccessors(
>
> serviceLocator : IServiceLocator ) :
>
> XMLList
>
>
>
> {
>
>
>
> /*
>
>
>
> var description : XML = describeType( serviceLocator );
>
>
>
> var accessors : XMLList = description.accessor.( @access == "readwrite"
> ).@name;
>
>
>
>
>
> return accessors;
>
>
>
> */
>
>
>
>
>
> return describeType( serviceLocator).accessors(@access ==
>
> "readwrite" ).@name;
>
>
>
> }
>
>
>
>
>
>
>
>
>
> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> Carlos, What Flash APIs is Cairngorm dependent on?
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Hi,
>
>
>
> Cairngorm depends on Flash APIs, so make a Royale migration could be not
> easy, or requires some expertise.
>
> You can use Crux instead that has support for Cairngorm style Commands.
> Crux is the same as Swiz Framework for Flex but rewritten to work in
> Royale, and supports much more like dependency injection, Inversion of
> control, event handling, ...
>
> You have 3 examples in the examples/crux folder you can check.
>
> I recommend you Crux over Cairngorm since Swiz was born to substitute
> Cairngorm
>
>
>
>
>
> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
> gustavodecarli@gmail.com>) escribió:
>
> Alex
>
>
>
> <version>0.9.7-SNAPSHOT</version>
>
>
>
> Thank
>
>
>
> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> What version of the compiler are you using?
>
>
>
> What does the ServiceLocator source look like? It might be an issue with
> defaultProperties for non-DOM objects.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 7:35 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Cairngorm problem add remote object MXML.
>
>
>
>
>
>
> I am trying to transcribe gairngorm, at runtime it gives me an error in
> the construction of the ServiceLocator, I understand that it is an error of
> the MXMLDataInterpreter. Anyone have any idea of the problem.
>
> Thank
>
> Gustavo.
>
>
>
> *1. CODE *
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <cairngorm:ServiceLocator
>
> xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137059053&sdata=FVSvnNBJ%2FkLg9%2ByVJ6DV2DxS4uOWvOTqJah5hINB2DU%3D&reserved=0>
> "
>
>
>
> xmlns:mx="library://ns.apache.org/royale/mx
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137069013&sdata=nX5LFxoQGG1NkXE3nrw%2B1ch3JeBCjej2mVfdOFagPtY%3D&reserved=0>
> "
>
>
>
> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>
>
>
>
>
> <mx:RemoteObject
>
> id="srvSeguridades"
>
>
>
> destination="seguridades"
>
>
>
> result="event.token.resultHandler(event)"
>
>
>
> fault="event.token.faultHandler(event)"
>
>
>
> endpoint="http://localhost:8080/messagebroker/amf"/>
>
>
>
>
>
> </cairngorm:ServiceLocator>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *2. LINE OF ERROR (RED)*
>
> /
>
>
>
> **
> * @constructor
> * @extends {com.adobe.cairngorm.business.ServiceLocator}
> */
> services.Servicio = function() {
> services.Servicio.base(this, 'constructor');
>
> /**
> * @private
> * @type {mx.rpc.remoting.mxml.RemoteObject}
> */
> this.srvSeguridades_;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldd;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldp;
>
> this.generateMXMLAttributes
> ([1,
> mx.rpc.remoting.mxml.RemoteObject,
> 3,
> 'id',
> true,
> 'srvSeguridades',
> 'destination',
> true,
> 'seguridades',
> 'endpoint',
> true,
> 'http://localhost:8080/messagebroker/amf',
> 0,
> 2,
> 'result',
> this.$EH0,
> 'fault',
> this.$EH1,
> null0, <- ERROR
> 0
> ]);
>
> };
>
>
>
>
>
> 3. Trace console log
>
>
>
> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
> at new services.Servicio (Servicio.js:61)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
> (MXMLDataInterpreter.js:126)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
> (MXMLDataInterpreter.js:271)
> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
> at main.Main.mx.core.Container.createChildren (Container.js:136)
> at main.Main.mx.core.Application.createChildren (Application.js:122)
> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
> at main.Main.mx.core.Container.addedToParent (Container.js:123)
> at
> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
> (UIBase.js:402)
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137069013&sdata=2uhZZc2WnPOKcwag6wyfqNhRd4RX5t67M0zo3y2rIgY%3D&reserved=0>
>
>
>
> --
>
> Shoichiro Takeshita
> 武下 祥一郎
>
> --
>
> Shoichiro Takeshita
> 武下 祥一郎
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137078969&sdata=TRudPfYqEH%2BPL7LAp%2FL1NFDHfdoOczOX3rvo1Qex%2FII%3D&reserved=0>
>
>
>
>
Re: Cairngorm problem add remote object MXML.
Posted by Alex Harui <ah...@adobe.com>.
I just pushed a change to the compiler. It should now have valid output for ServiceLocator.
The compiler change was interesting in that I changed an else clause that was put in to handle instances specified as children of top tags but was doing the wrong thing. All of the compiler tests passed, but never hit that code so none of our tests actually used that code, even though the commit log implied it was for one of the tests. Either I made the earlier change to propagate the fix for plain properties to instances or there is some other scenario for instances as children (without a default property) that I am not thinking of.
-Alex
From: De Carli Gustavo <gu...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Thursday, February 6, 2020 at 6:03 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Cairngorm problem add remote object MXML.
Exactly, cairmgorm, as Carlos says, is not the best option, but we save a lot of time in migrations where they use it and leave more time for other questions.
i will continue to test how to fill that array today.
Thank you very much for everyone in this collaboration.
Gustavo.
El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>>) escribió:
Thanks Greg, for the sponsor credits, and thanks Takeshita for the words :)
I know Cairngorm could be good for people wanting to migrate with the less effort possible. Anyway, I recommend, if possible to try to switch to Crux. We already did that several years ago in Flex, since all DI, IOC stuff, make us be more efficient and increase options. For people creating new apps, for me there's no doubt, for people migrating, should contemplate the Crux option if they continue evolving the app with new features...
just my 2 :)
Carlos
El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>>) escribió:
Greg, thanks for your clarification. Anyway, it is a great work. Carlos, thanks all the times.^_^
2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>>:
Hi Takeshita,
Yes I think a few people have asked for Cairngorm or expressed interest in it. Given the choice, I personally think Crux will be a more modern/better option, but like I said, more people are asking for Cairngorm now, so probably it makes sense to port that too.
I'm also pleased to hear that you are using Crux, I hope it's working well for you. Please report any issues if you see them.
One small thing: I definitely understand that you were referring to the work I did on porting it to Royale, but just for the sake of anyone else who reads this: it's definitely not 'my Crux framework'. The code is ported from Swiz, and credit for the awesome features it has rests with the original authors of Swiz (I was in contact with the original developer during my efforts to port it to Royale).
Also, just so people are aware, Carlos sponsored the majority of my work on porting that, so you really have Carlos to thank for that.
cheers,
Greg
On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>> wrote:
Greg,
Thanks for your work. We already have your Crux framework replacing Cairngorm, it is great if Cairngorm works with Royale. It will save a plenty of time of emulation work.
2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>>:
There does not appear to be a default property, like an array to put the 'children' in. I think it just creates the children as instances and makes sure they have id properties on the mxml-generated subclass that the instances are assigned to.
The services are then identified and categorised by iterating the accessors of the ServiceLocator subclass via reflection and checking their types and then registering them.
Although it is and mxml instance of ServiceLocator, it is also an enforced singleton which is accessed elsewhere from code. At least that is how it appears to be set up to me.
I already took a look at the code and have made (not many) local changes and have the Cairngorm swc compiling via maven for both js and swf. I have not tested it. Things like weak event listeners are gone.
The main issue I think will be the Event.ADDED and Event.REMOVED for ViewHelper automated register/unregister. Maybe we can have a CaingormViewBase class with support for these, or perhaps we can use the ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might be all that is needed, but it may not always work the same.
I'll try to tidy it up and share it tomorrow. The licence is BSD and is permissive (https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137049095&sdata=8MGGGyFXPPsgG%2BdTxTWp7S7OtM6wd94xShq1VB4%2BD%2BA%3D&reserved=0>) - It seems to be to be similar to others like MIT etc, but I don't know specifically what the rules are for Apache with that licence (in terms of possibility to include in Royale itself).
On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>> wrote:
Alex :
In flex use the swc. I am seeing the same thing that you are commenting, I do not understand where it assigns the remote objects to the ServiceLocator. This would have to be added to the "services" attribute of the RemoteObjects class. I will try to assign by code without using the mxml to see if it does not generate the error "null0".
El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>>) escribió:
I grabbed ServiceLocator.as and was able to produce the null0 problem, but the cause is that ServiceLocator does not have a default property. Did your MXML work in Flex? What ServiceLocator property would be assigned the mx:RemoteObject?
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 12:00 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
I download https://sourceforge.net/adobe/cairngorm/code/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137059053&sdata=8YKHsj0ALwP0uj5inyyUHIx092KYsX%2FvDBxwR1r0UKM%3D&reserved=0>, and change.
import flash.utils.describeType;
--> import org.apache.royale.reflection.describeType;
import flash.utils.Dictionary;
--> import org.apache.royale.utils.ObjectMap;
And this method
/**
* Return all the accessors on this object.
* @param serviceLocator the IServiceLocator instance.
* @return this object's accessors.
*/
protected
function getAccessors(
serviceLocator : IServiceLocator ) :
XMLList
{
/*
var description : XML = describeType( serviceLocator );
var accessors : XMLList = description.accessor.( @access == "readwrite" ).@name;
return accessors;
*/
return describeType( serviceLocator).accessors(@access ==
"readwrite" ).@name;
}
El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>>) escribió:
Carlos, What Flash APIs is Cairngorm dependent on?
-Alex
From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 10:05 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Hi,
Cairngorm depends on Flash APIs, so make a Royale migration could be not easy, or requires some expertise.
You can use Crux instead that has support for Cairngorm style Commands. Crux is the same as Swiz Framework for Flex but rewritten to work in Royale, and supports much more like dependency injection, Inversion of control, event handling, ...
You have 3 examples in the examples/crux folder you can check.
I recommend you Crux over Cairngorm since Swiz was born to substitute Cairngorm
El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<gu...@gmail.com>>) escribió:
Alex
<version>0.9.7-SNAPSHOT</version>
Thank
El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>>) escribió:
What version of the compiler are you using?
What does the ServiceLocator source look like? It might be an issue with defaultProperties for non-DOM objects.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 7:35 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the construction of the ServiceLocator, I understand that it is an error of the MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
1. CODE
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137059053&sdata=FVSvnNBJ%2FkLg9%2ByVJ6DV2DxS4uOWvOTqJah5hINB2DU%3D&reserved=0>"
xmlns:mx="library://ns.apache.org/royale/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137069013&sdata=nX5LFxoQGG1NkXE3nrw%2B1ch3JeBCjej2mVfdOFagPtY%3D&reserved=0>"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject
id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
2. LINE OF ERROR (RED)
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray (MXMLDataInterpreter.js:126)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances (MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement (UIBase.js:402)
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137069013&sdata=2uhZZc2WnPOKcwag6wyfqNhRd4RX5t67M0zo3y2rIgY%3D&reserved=0>
--
Shoichiro Takeshita
武下 祥一郎
--
Shoichiro Takeshita
武下 祥一郎
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce9baec7ecf5c49785e5f08d7ab0d5969%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165946137078969&sdata=TRudPfYqEH%2BPL7LAp%2FL1NFDHfdoOczOX3rvo1Qex%2FII%3D&reserved=0>
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Exactly, cairmgorm, as Carlos says, is not the best option, but we save a
lot of time in migrations where they use it and leave more time for other
questions.
i will continue to test how to fill that array today.
Thank you very much for everyone in this collaboration.
Gustavo.
El jue., 6 feb. 2020 a las 8:39, Carlos Rovira (<ca...@apache.org>)
escribió:
> Thanks Greg, for the sponsor credits, and thanks Takeshita for the words :)
>
> I know Cairngorm could be good for people wanting to migrate with the less
> effort possible. Anyway, I recommend, if possible to try to switch to Crux.
> We already did that several years ago in Flex, since all DI, IOC stuff,
> make us be more efficient and increase options. For people creating new
> apps, for me there's no doubt, for people migrating, should contemplate the
> Crux option if they continue evolving the app with new features...
>
> just my 2 :)
>
> Carlos
>
>
>
> El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
> escribió:
>
>> Greg, thanks for your clarification. Anyway, it is a great work.
>> Carlos, thanks all the times.^_^
>>
>> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>>
>>>
>>> Hi Takeshita,
>>>
>>> Yes I think a few people have asked for Cairngorm or expressed interest
>>> in it. Given the choice, I personally think Crux will be a more
>>> modern/better option, but like I said, more people are asking for Cairngorm
>>> now, so probably it makes sense to port that too.
>>>
>>> I'm also pleased to hear that you are using Crux, I hope it's working
>>> well for you. Please report any issues if you see them.
>>>
>>> One small thing: I definitely understand that you were referring to the
>>> work I did on porting it to Royale, but just for the sake of anyone else
>>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>>> from Swiz, and credit for the awesome features it has rests with the
>>> original authors of Swiz (I was in contact with the original developer
>>> during my efforts to port it to Royale).
>>> Also, just so people are aware, Carlos sponsored the majority of my work
>>> on porting that, so you really have Carlos to thank for that.
>>>
>>> cheers,
>>> Greg
>>>
>>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>>> wrote:
>>>
>>>> Greg,
>>>>
>>>> Thanks for your work. We already have your Crux framework replacing
>>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>>> plenty of time of emulation work.
>>>>
>>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>>
>>>>>
>>>>> There does not appear to be a default property, like an array to put
>>>>> the 'children' in. I think it just creates the children as instances and
>>>>> makes sure they have id properties on the mxml-generated subclass that the
>>>>> instances are assigned to.
>>>>>
>>>>> The services are then identified and categorised by iterating the
>>>>> accessors of the ServiceLocator subclass via reflection and checking their
>>>>> types and then registering them.
>>>>> Although it is and mxml instance of ServiceLocator, it is also an
>>>>> enforced singleton which is accessed elsewhere from code. At least that is
>>>>> how it appears to be set up to me.
>>>>>
>>>>> I already took a look at the code and have made (not many) local
>>>>> changes and have the Cairngorm swc compiling via maven for both js and swf.
>>>>> I have not tested it. Things like weak event listeners are gone.
>>>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>>>> ViewHelper automated register/unregister. Maybe we can have a
>>>>> CaingormViewBase class with support for these, or perhaps we can use the
>>>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>>>> be all that is needed, but it may not always work the same.
>>>>>
>>>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and
>>>>> is permissive (
>>>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt) -
>>>>> It seems to be to be similar to others like MIT etc, but I don't know
>>>>> specifically what the rules are for Apache with that licence (in terms of
>>>>> possibility to include in Royale itself).
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>>>> gustavodecarli@gmail.com> wrote:
>>>>>
>>>>>> Alex :
>>>>>>
>>>>>> In flex use the swc. I am seeing the same thing that you are
>>>>>> commenting, I do not understand where it assigns the remote objects to the
>>>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>>>> the RemoteObjects class. I will try to assign by code without using the
>>>>>> mxml to see if it does not generate the error "null0".
>>>>>>
>>>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>>>> escribió:
>>>>>>
>>>>>>> I grabbed ServiceLocator.as and was able to produce the null0
>>>>>>> problem, but the cause is that ServiceLocator does not have a default
>>>>>>> property. Did your MXML work in Flex? What ServiceLocator property would
>>>>>>> be assigned the mx:RemoteObject?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132948281&sdata=jHABq2xbIpH9Q6aiYAWl1u23LkdalccZkE7uIbyJy3E%3D&reserved=0>,
>>>>>>> and change.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> import flash.utils.describeType;
>>>>>>>
>>>>>>> --> import org.apache.royale.reflection.describeType;
>>>>>>>
>>>>>>> import flash.utils.Dictionary;
>>>>>>>
>>>>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> And this method
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> /**
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> * Return all the accessors on this object.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> * @param serviceLocator the IServiceLocator instance.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> * @return this object's accessors.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> */
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> protected
>>>>>>>
>>>>>>> function getAccessors(
>>>>>>>
>>>>>>> serviceLocator : IServiceLocator ) :
>>>>>>>
>>>>>>> XMLList
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> {
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> /*
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> var description : XML = describeType( serviceLocator );
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> var accessors : XMLList = description.accessor.( @access ==
>>>>>>> "readwrite" ).@name;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> return accessors;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> */
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> return describeType( serviceLocator).accessors(@access ==
>>>>>>>
>>>>>>> "readwrite" ).@name;
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> }
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>>>>> escribió:
>>>>>>>
>>>>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Hi,
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>>>>> not easy, or requires some expertise.
>>>>>>>
>>>>>>> You can use Crux instead that has support for Cairngorm style
>>>>>>> Commands. Crux is the same as Swiz Framework for Flex but rewritten to work
>>>>>>> in Royale, and supports much more like dependency injection, Inversion of
>>>>>>> control, event handling, ...
>>>>>>>
>>>>>>> You have 3 examples in the examples/crux folder you can check.
>>>>>>>
>>>>>>> I recommend you Crux over Cairngorm since Swiz was born to
>>>>>>> substitute Cairngorm
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>>>>> gustavodecarli@gmail.com>) escribió:
>>>>>>>
>>>>>>> Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <version>0.9.7-SNAPSHOT</version>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Thank
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>>>>> escribió:
>>>>>>>
>>>>>>> What version of the compiler are you using?
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> What does the ServiceLocator source look like? It might be an issue
>>>>>>> with defaultProperties for non-DOM objects.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> -Alex
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> I am trying to transcribe gairngorm, at runtime it gives me an error
>>>>>>> in the construction of the ServiceLocator, I understand that it is an error
>>>>>>> of the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>>>>
>>>>>>> Thank
>>>>>>>
>>>>>>> Gustavo.
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *1. CODE *
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <cairngorm:ServiceLocator
>>>>>>>
>>>>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132958276&sdata=D2z6jFGBTx4%2BBwOqQ4XwVSKQ0UcBb6eKavH2T0YYOA4%3D&reserved=0>
>>>>>>> "
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=RXTRBxfU2GmONGZEMCb%2B4pdF1BIv20ZcCXskhvQ7XPw%3D&reserved=0>
>>>>>>> "
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> <mx:RemoteObject
>>>>>>>
>>>>>>> id="srvSeguridades"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> destination="seguridades"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> result="event.token.resultHandler(event)"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> fault="event.token.faultHandler(event)"
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> </cairngorm:ServiceLocator>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> *2. LINE OF ERROR (RED)*
>>>>>>>
>>>>>>> /
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> **
>>>>>>> * @constructor
>>>>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>>>>> */
>>>>>>> services.Servicio = function() {
>>>>>>> services.Servicio.base(this, 'constructor');
>>>>>>>
>>>>>>> /**
>>>>>>> * @private
>>>>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>>>>> */
>>>>>>> this.srvSeguridades_;
>>>>>>>
>>>>>>> /**
>>>>>>> * @private
>>>>>>> * @type {Array}
>>>>>>> */
>>>>>>> this.mxmldd;
>>>>>>>
>>>>>>> /**
>>>>>>> * @private
>>>>>>> * @type {Array}
>>>>>>> */
>>>>>>> this.mxmldp;
>>>>>>>
>>>>>>> this.generateMXMLAttributes
>>>>>>> ([1,
>>>>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>>>>> 3,
>>>>>>> 'id',
>>>>>>> true,
>>>>>>> 'srvSeguridades',
>>>>>>> 'destination',
>>>>>>> true,
>>>>>>> 'seguridades',
>>>>>>> 'endpoint',
>>>>>>> true,
>>>>>>> 'http://localhost:8080/messagebroker/amf',
>>>>>>> 0,
>>>>>>> 2,
>>>>>>> 'result',
>>>>>>> this.$EH0,
>>>>>>> 'fault',
>>>>>>> this.$EH1,
>>>>>>> null0, <- ERROR
>>>>>>> 0
>>>>>>> ]);
>>>>>>>
>>>>>>> };
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> 3. Trace console log
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>>>>> at new services.Servicio (Servicio.js:61)
>>>>>>> at
>>>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>>>>> (MXMLDataInterpreter.js:126)
>>>>>>> at
>>>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>>>>> (MXMLDataInterpreter.js:271)
>>>>>>> at main.Main.mx.core.UIComponent.createChildren
>>>>>>> (UIComponent.js:923)
>>>>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>>>>> at main.Main.mx.core.Application.createChildren
>>>>>>> (Application.js:122)
>>>>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>>>>> at main.Main.mx.core.UIComponent.addedToParent
>>>>>>> (UIComponent.js:417)
>>>>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>>>>> at
>>>>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>>>>> (UIBase.js:402)
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>>>>>
>>>>>>> Carlos Rovira
>>>>>>>
>>>>>>> http://about.me/carlosrovira
>>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=XhkJr%2Bar3%2Fpt4hFsMBYUB3AWiWMEkiQjdBSpNhRDP4o%3D&reserved=0>
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> --
>>>> Shoichiro Takeshita
>>>> 武下 祥一郎
>>>>
>>> --
>> Shoichiro Takeshita
>> 武下 祥一郎
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
Re: Cairngorm problem add remote object MXML.
Posted by Carlos Rovira <ca...@apache.org>.
Thanks Greg, for the sponsor credits, and thanks Takeshita for the words :)
I know Cairngorm could be good for people wanting to migrate with the less
effort possible. Anyway, I recommend, if possible to try to switch to Crux.
We already did that several years ago in Flex, since all DI, IOC stuff,
make us be more efficient and increase options. For people creating new
apps, for me there's no doubt, for people migrating, should contemplate the
Crux option if they continue evolving the app with new features...
just my 2 :)
Carlos
El jue., 6 feb. 2020 a las 5:28, Takeshita Shoichiro (<jl...@gmail.com>)
escribió:
> Greg, thanks for your clarification. Anyway, it is a great work.
> Carlos, thanks all the times.^_^
>
> 2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>
>>
>> Hi Takeshita,
>>
>> Yes I think a few people have asked for Cairngorm or expressed interest
>> in it. Given the choice, I personally think Crux will be a more
>> modern/better option, but like I said, more people are asking for Cairngorm
>> now, so probably it makes sense to port that too.
>>
>> I'm also pleased to hear that you are using Crux, I hope it's working
>> well for you. Please report any issues if you see them.
>>
>> One small thing: I definitely understand that you were referring to the
>> work I did on porting it to Royale, but just for the sake of anyone else
>> who reads this: it's definitely not 'my Crux framework'. The code is ported
>> from Swiz, and credit for the awesome features it has rests with the
>> original authors of Swiz (I was in contact with the original developer
>> during my efforts to port it to Royale).
>> Also, just so people are aware, Carlos sponsored the majority of my work
>> on porting that, so you really have Carlos to thank for that.
>>
>> cheers,
>> Greg
>>
>> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
>> wrote:
>>
>>> Greg,
>>>
>>> Thanks for your work. We already have your Crux framework replacing
>>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>>> plenty of time of emulation work.
>>>
>>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>>
>>>>
>>>> There does not appear to be a default property, like an array to put
>>>> the 'children' in. I think it just creates the children as instances and
>>>> makes sure they have id properties on the mxml-generated subclass that the
>>>> instances are assigned to.
>>>>
>>>> The services are then identified and categorised by iterating the
>>>> accessors of the ServiceLocator subclass via reflection and checking their
>>>> types and then registering them.
>>>> Although it is and mxml instance of ServiceLocator, it is also an
>>>> enforced singleton which is accessed elsewhere from code. At least that is
>>>> how it appears to be set up to me.
>>>>
>>>> I already took a look at the code and have made (not many) local
>>>> changes and have the Cairngorm swc compiling via maven for both js and swf.
>>>> I have not tested it. Things like weak event listeners are gone.
>>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>>> ViewHelper automated register/unregister. Maybe we can have a
>>>> CaingormViewBase class with support for these, or perhaps we can use the
>>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>>> be all that is needed, but it may not always work the same.
>>>>
>>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>>>> permissive (
>>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt) -
>>>> It seems to be to be similar to others like MIT etc, but I don't know
>>>> specifically what the rules are for Apache with that licence (in terms of
>>>> possibility to include in Royale itself).
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>>> gustavodecarli@gmail.com> wrote:
>>>>
>>>>> Alex :
>>>>>
>>>>> In flex use the swc. I am seeing the same thing that you are
>>>>> commenting, I do not understand where it assigns the remote objects to the
>>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>>> the RemoteObjects class. I will try to assign by code without using the
>>>>> mxml to see if it does not generate the error "null0".
>>>>>
>>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>>> I grabbed ServiceLocator.as and was able to produce the null0
>>>>>> problem, but the cause is that ServiceLocator does not have a default
>>>>>> property. Did your MXML work in Flex? What ServiceLocator property would
>>>>>> be assigned the mx:RemoteObject?
>>>>>>
>>>>>>
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132948281&sdata=jHABq2xbIpH9Q6aiYAWl1u23LkdalccZkE7uIbyJy3E%3D&reserved=0>,
>>>>>> and change.
>>>>>>
>>>>>>
>>>>>>
>>>>>> import flash.utils.describeType;
>>>>>>
>>>>>> --> import org.apache.royale.reflection.describeType;
>>>>>>
>>>>>> import flash.utils.Dictionary;
>>>>>>
>>>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>>>
>>>>>>
>>>>>>
>>>>>> And this method
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> /**
>>>>>>
>>>>>>
>>>>>>
>>>>>> * Return all the accessors on this object.
>>>>>>
>>>>>>
>>>>>>
>>>>>> * @param serviceLocator the IServiceLocator instance.
>>>>>>
>>>>>>
>>>>>>
>>>>>> * @return this object's accessors.
>>>>>>
>>>>>>
>>>>>>
>>>>>> */
>>>>>>
>>>>>>
>>>>>>
>>>>>> protected
>>>>>>
>>>>>> function getAccessors(
>>>>>>
>>>>>> serviceLocator : IServiceLocator ) :
>>>>>>
>>>>>> XMLList
>>>>>>
>>>>>>
>>>>>>
>>>>>> {
>>>>>>
>>>>>>
>>>>>>
>>>>>> /*
>>>>>>
>>>>>>
>>>>>>
>>>>>> var description : XML = describeType( serviceLocator );
>>>>>>
>>>>>>
>>>>>>
>>>>>> var accessors : XMLList = description.accessor.( @access ==
>>>>>> "readwrite" ).@name;
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> return accessors;
>>>>>>
>>>>>>
>>>>>>
>>>>>> */
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> return describeType( serviceLocator).accessors(@access ==
>>>>>>
>>>>>> "readwrite" ).@name;
>>>>>>
>>>>>>
>>>>>>
>>>>>> }
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>>>> escribió:
>>>>>>
>>>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>>>
>>>>>>
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>> Hi,
>>>>>>
>>>>>>
>>>>>>
>>>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>>>> not easy, or requires some expertise.
>>>>>>
>>>>>> You can use Crux instead that has support for Cairngorm style
>>>>>> Commands. Crux is the same as Swiz Framework for Flex but rewritten to work
>>>>>> in Royale, and supports much more like dependency injection, Inversion of
>>>>>> control, event handling, ...
>>>>>>
>>>>>> You have 3 examples in the examples/crux folder you can check.
>>>>>>
>>>>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>>>>> Cairngorm
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>>>> gustavodecarli@gmail.com>) escribió:
>>>>>>
>>>>>> Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> <version>0.9.7-SNAPSHOT</version>
>>>>>>
>>>>>>
>>>>>>
>>>>>> Thank
>>>>>>
>>>>>>
>>>>>>
>>>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>>>> escribió:
>>>>>>
>>>>>> What version of the compiler are you using?
>>>>>>
>>>>>>
>>>>>>
>>>>>> What does the ServiceLocator source look like? It might be an issue
>>>>>> with defaultProperties for non-DOM objects.
>>>>>>
>>>>>>
>>>>>>
>>>>>> -Alex
>>>>>>
>>>>>>
>>>>>>
>>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> I am trying to transcribe gairngorm, at runtime it gives me an error
>>>>>> in the construction of the ServiceLocator, I understand that it is an error
>>>>>> of the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>>>
>>>>>> Thank
>>>>>>
>>>>>> Gustavo.
>>>>>>
>>>>>>
>>>>>>
>>>>>> *1. CODE *
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <cairngorm:ServiceLocator
>>>>>>
>>>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132958276&sdata=D2z6jFGBTx4%2BBwOqQ4XwVSKQ0UcBb6eKavH2T0YYOA4%3D&reserved=0>
>>>>>> "
>>>>>>
>>>>>>
>>>>>>
>>>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=RXTRBxfU2GmONGZEMCb%2B4pdF1BIv20ZcCXskhvQ7XPw%3D&reserved=0>
>>>>>> "
>>>>>>
>>>>>>
>>>>>>
>>>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> <mx:RemoteObject
>>>>>>
>>>>>> id="srvSeguridades"
>>>>>>
>>>>>>
>>>>>>
>>>>>> destination="seguridades"
>>>>>>
>>>>>>
>>>>>>
>>>>>> result="event.token.resultHandler(event)"
>>>>>>
>>>>>>
>>>>>>
>>>>>> fault="event.token.faultHandler(event)"
>>>>>>
>>>>>>
>>>>>>
>>>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> </cairngorm:ServiceLocator>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> *2. LINE OF ERROR (RED)*
>>>>>>
>>>>>> /
>>>>>>
>>>>>>
>>>>>>
>>>>>> **
>>>>>> * @constructor
>>>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>>>> */
>>>>>> services.Servicio = function() {
>>>>>> services.Servicio.base(this, 'constructor');
>>>>>>
>>>>>> /**
>>>>>> * @private
>>>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>>>> */
>>>>>> this.srvSeguridades_;
>>>>>>
>>>>>> /**
>>>>>> * @private
>>>>>> * @type {Array}
>>>>>> */
>>>>>> this.mxmldd;
>>>>>>
>>>>>> /**
>>>>>> * @private
>>>>>> * @type {Array}
>>>>>> */
>>>>>> this.mxmldp;
>>>>>>
>>>>>> this.generateMXMLAttributes
>>>>>> ([1,
>>>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>>>> 3,
>>>>>> 'id',
>>>>>> true,
>>>>>> 'srvSeguridades',
>>>>>> 'destination',
>>>>>> true,
>>>>>> 'seguridades',
>>>>>> 'endpoint',
>>>>>> true,
>>>>>> 'http://localhost:8080/messagebroker/amf',
>>>>>> 0,
>>>>>> 2,
>>>>>> 'result',
>>>>>> this.$EH0,
>>>>>> 'fault',
>>>>>> this.$EH1,
>>>>>> null0, <- ERROR
>>>>>> 0
>>>>>> ]);
>>>>>>
>>>>>> };
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> 3. Trace console log
>>>>>>
>>>>>>
>>>>>>
>>>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>>>> at new services.Servicio (Servicio.js:61)
>>>>>> at
>>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>>>> (MXMLDataInterpreter.js:126)
>>>>>> at
>>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>>>> (MXMLDataInterpreter.js:271)
>>>>>> at main.Main.mx.core.UIComponent.createChildren
>>>>>> (UIComponent.js:923)
>>>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>>>> at main.Main.mx.core.Application.createChildren
>>>>>> (Application.js:122)
>>>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>>>> at main.Main.mx.core.UIComponent.addedToParent
>>>>>> (UIComponent.js:417)
>>>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>>>> at
>>>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>>>> (UIBase.js:402)
>>>>>>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>>>>>
>>>>>> Carlos Rovira
>>>>>>
>>>>>> http://about.me/carlosrovira
>>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=XhkJr%2Bar3%2Fpt4hFsMBYUB3AWiWMEkiQjdBSpNhRDP4o%3D&reserved=0>
>>>>>>
>>>>>>
>>>>>>
>>>>>> --
>>> Shoichiro Takeshita
>>> 武下 祥一郎
>>>
>> --
> Shoichiro Takeshita
> 武下 祥一郎
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Cairngorm problem add remote object MXML.
Posted by Takeshita Shoichiro <jl...@gmail.com>.
Greg, thanks for your clarification. Anyway, it is a great work. Carlos,
thanks all the times.^_^
2020年2月6日(木) 13:22 Greg Dove <gr...@gmail.com>:
>
> Hi Takeshita,
>
> Yes I think a few people have asked for Cairngorm or expressed interest in
> it. Given the choice, I personally think Crux will be a more modern/better
> option, but like I said, more people are asking for Cairngorm now, so
> probably it makes sense to port that too.
>
> I'm also pleased to hear that you are using Crux, I hope it's working well
> for you. Please report any issues if you see them.
>
> One small thing: I definitely understand that you were referring to the
> work I did on porting it to Royale, but just for the sake of anyone else
> who reads this: it's definitely not 'my Crux framework'. The code is ported
> from Swiz, and credit for the awesome features it has rests with the
> original authors of Swiz (I was in contact with the original developer
> during my efforts to port it to Royale).
> Also, just so people are aware, Carlos sponsored the majority of my work
> on porting that, so you really have Carlos to thank for that.
>
> cheers,
> Greg
>
> On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
> wrote:
>
>> Greg,
>>
>> Thanks for your work. We already have your Crux framework replacing
>> Cairngorm, it is great if Cairngorm works with Royale. It will save a
>> plenty of time of emulation work.
>>
>> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>>
>>>
>>> There does not appear to be a default property, like an array to put the
>>> 'children' in. I think it just creates the children as instances and makes
>>> sure they have id properties on the mxml-generated subclass that the
>>> instances are assigned to.
>>>
>>> The services are then identified and categorised by iterating the
>>> accessors of the ServiceLocator subclass via reflection and checking their
>>> types and then registering them.
>>> Although it is and mxml instance of ServiceLocator, it is also an
>>> enforced singleton which is accessed elsewhere from code. At least that is
>>> how it appears to be set up to me.
>>>
>>> I already took a look at the code and have made (not many) local changes
>>> and have the Cairngorm swc compiling via maven for both js and swf. I have
>>> not tested it. Things like weak event listeners are gone.
>>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>>> ViewHelper automated register/unregister. Maybe we can have a
>>> CaingormViewBase class with support for these, or perhaps we can use the
>>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>>> be all that is needed, but it may not always work the same.
>>>
>>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>>> permissive (
>>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt) -
>>> It seems to be to be similar to others like MIT etc, but I don't know
>>> specifically what the rules are for Apache with that licence (in terms of
>>> possibility to include in Royale itself).
>>>
>>>
>>>
>>>
>>>
>>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <
>>> gustavodecarli@gmail.com> wrote:
>>>
>>>> Alex :
>>>>
>>>> In flex use the swc. I am seeing the same thing that you are
>>>> commenting, I do not understand where it assigns the remote objects to the
>>>> ServiceLocator. This would have to be added to the "services" attribute of
>>>> the RemoteObjects class. I will try to assign by code without using the
>>>> mxml to see if it does not generate the error "null0".
>>>>
>>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>>>> but the cause is that ServiceLocator does not have a default property. Did
>>>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>>>> mx:RemoteObject?
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132948281&sdata=jHABq2xbIpH9Q6aiYAWl1u23LkdalccZkE7uIbyJy3E%3D&reserved=0>,
>>>>> and change.
>>>>>
>>>>>
>>>>>
>>>>> import flash.utils.describeType;
>>>>>
>>>>> --> import org.apache.royale.reflection.describeType;
>>>>>
>>>>> import flash.utils.Dictionary;
>>>>>
>>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>>
>>>>>
>>>>>
>>>>> And this method
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> /**
>>>>>
>>>>>
>>>>>
>>>>> * Return all the accessors on this object.
>>>>>
>>>>>
>>>>>
>>>>> * @param serviceLocator the IServiceLocator instance.
>>>>>
>>>>>
>>>>>
>>>>> * @return this object's accessors.
>>>>>
>>>>>
>>>>>
>>>>> */
>>>>>
>>>>>
>>>>>
>>>>> protected
>>>>>
>>>>> function getAccessors(
>>>>>
>>>>> serviceLocator : IServiceLocator ) :
>>>>>
>>>>> XMLList
>>>>>
>>>>>
>>>>>
>>>>> {
>>>>>
>>>>>
>>>>>
>>>>> /*
>>>>>
>>>>>
>>>>>
>>>>> var description : XML = describeType( serviceLocator );
>>>>>
>>>>>
>>>>>
>>>>> var accessors : XMLList = description.accessor.( @access ==
>>>>> "readwrite" ).@name;
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> return accessors;
>>>>>
>>>>>
>>>>>
>>>>> */
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> return describeType( serviceLocator).accessors(@access ==
>>>>>
>>>>> "readwrite" ).@name;
>>>>>
>>>>>
>>>>>
>>>>> }
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>> Hi,
>>>>>
>>>>>
>>>>>
>>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>>> not easy, or requires some expertise.
>>>>>
>>>>> You can use Crux instead that has support for Cairngorm style
>>>>> Commands. Crux is the same as Swiz Framework for Flex but rewritten to work
>>>>> in Royale, and supports much more like dependency injection, Inversion of
>>>>> control, event handling, ...
>>>>>
>>>>> You have 3 examples in the examples/crux folder you can check.
>>>>>
>>>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>>>> Cairngorm
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>>> gustavodecarli@gmail.com>) escribió:
>>>>>
>>>>> Alex
>>>>>
>>>>>
>>>>>
>>>>> <version>0.9.7-SNAPSHOT</version>
>>>>>
>>>>>
>>>>>
>>>>> Thank
>>>>>
>>>>>
>>>>>
>>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>>> escribió:
>>>>>
>>>>> What version of the compiler are you using?
>>>>>
>>>>>
>>>>>
>>>>> What does the ServiceLocator source look like? It might be an issue
>>>>> with defaultProperties for non-DOM objects.
>>>>>
>>>>>
>>>>>
>>>>> -Alex
>>>>>
>>>>>
>>>>>
>>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> I am trying to transcribe gairngorm, at runtime it gives me an error
>>>>> in the construction of the ServiceLocator, I understand that it is an error
>>>>> of the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>>
>>>>> Thank
>>>>>
>>>>> Gustavo.
>>>>>
>>>>>
>>>>>
>>>>> *1. CODE *
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>>
>>>>>
>>>>>
>>>>> <cairngorm:ServiceLocator
>>>>>
>>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132958276&sdata=D2z6jFGBTx4%2BBwOqQ4XwVSKQ0UcBb6eKavH2T0YYOA4%3D&reserved=0>
>>>>> "
>>>>>
>>>>>
>>>>>
>>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=RXTRBxfU2GmONGZEMCb%2B4pdF1BIv20ZcCXskhvQ7XPw%3D&reserved=0>
>>>>> "
>>>>>
>>>>>
>>>>>
>>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> <mx:RemoteObject
>>>>>
>>>>> id="srvSeguridades"
>>>>>
>>>>>
>>>>>
>>>>> destination="seguridades"
>>>>>
>>>>>
>>>>>
>>>>> result="event.token.resultHandler(event)"
>>>>>
>>>>>
>>>>>
>>>>> fault="event.token.faultHandler(event)"
>>>>>
>>>>>
>>>>>
>>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> </cairngorm:ServiceLocator>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> *2. LINE OF ERROR (RED)*
>>>>>
>>>>> /
>>>>>
>>>>>
>>>>>
>>>>> **
>>>>> * @constructor
>>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>>> */
>>>>> services.Servicio = function() {
>>>>> services.Servicio.base(this, 'constructor');
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>>> */
>>>>> this.srvSeguridades_;
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {Array}
>>>>> */
>>>>> this.mxmldd;
>>>>>
>>>>> /**
>>>>> * @private
>>>>> * @type {Array}
>>>>> */
>>>>> this.mxmldp;
>>>>>
>>>>> this.generateMXMLAttributes
>>>>> ([1,
>>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>>> 3,
>>>>> 'id',
>>>>> true,
>>>>> 'srvSeguridades',
>>>>> 'destination',
>>>>> true,
>>>>> 'seguridades',
>>>>> 'endpoint',
>>>>> true,
>>>>> 'http://localhost:8080/messagebroker/amf',
>>>>> 0,
>>>>> 2,
>>>>> 'result',
>>>>> this.$EH0,
>>>>> 'fault',
>>>>> this.$EH1,
>>>>> null0, <- ERROR
>>>>> 0
>>>>> ]);
>>>>>
>>>>> };
>>>>>
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> 3. Trace console log
>>>>>
>>>>>
>>>>>
>>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>>> at new services.Servicio (Servicio.js:61)
>>>>> at
>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>>> (MXMLDataInterpreter.js:126)
>>>>> at
>>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>>> (MXMLDataInterpreter.js:271)
>>>>> at main.Main.mx.core.UIComponent.createChildren
>>>>> (UIComponent.js:923)
>>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>>> at main.Main.mx.core.Application.createChildren
>>>>> (Application.js:122)
>>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>>> at
>>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>>> (UIBase.js:402)
>>>>>
>>>>>
>>>>>
>>>>>
>>>>> --
>>>>>
>>>>> Carlos Rovira
>>>>>
>>>>> http://about.me/carlosrovira
>>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=XhkJr%2Bar3%2Fpt4hFsMBYUB3AWiWMEkiQjdBSpNhRDP4o%3D&reserved=0>
>>>>>
>>>>>
>>>>>
>>>>> --
>> Shoichiro Takeshita
>> 武下 祥一郎
>>
> --
Shoichiro Takeshita
武下 祥一郎
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
Hi Takeshita,
Yes I think a few people have asked for Cairngorm or expressed interest in
it. Given the choice, I personally think Crux will be a more modern/better
option, but like I said, more people are asking for Cairngorm now, so
probably it makes sense to port that too.
I'm also pleased to hear that you are using Crux, I hope it's working well
for you. Please report any issues if you see them.
One small thing: I definitely understand that you were referring to the
work I did on porting it to Royale, but just for the sake of anyone else
who reads this: it's definitely not 'my Crux framework'. The code is ported
from Swiz, and credit for the awesome features it has rests with the
original authors of Swiz (I was in contact with the original developer
during my efforts to port it to Royale).
Also, just so people are aware, Carlos sponsored the majority of my work on
porting that, so you really have Carlos to thank for that.
cheers,
Greg
On Thu, Feb 6, 2020 at 5:04 PM Takeshita Shoichiro <jl...@gmail.com>
wrote:
> Greg,
>
> Thanks for your work. We already have your Crux framework replacing
> Cairngorm, it is great if Cairngorm works with Royale. It will save a
> plenty of time of emulation work.
>
> 2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>
>>
>> There does not appear to be a default property, like an array to put the
>> 'children' in. I think it just creates the children as instances and makes
>> sure they have id properties on the mxml-generated subclass that the
>> instances are assigned to.
>>
>> The services are then identified and categorised by iterating the
>> accessors of the ServiceLocator subclass via reflection and checking their
>> types and then registering them.
>> Although it is and mxml instance of ServiceLocator, it is also an
>> enforced singleton which is accessed elsewhere from code. At least that is
>> how it appears to be set up to me.
>>
>> I already took a look at the code and have made (not many) local changes
>> and have the Cairngorm swc compiling via maven for both js and swf. I have
>> not tested it. Things like weak event listeners are gone.
>> The main issue I think will be the Event.ADDED and Event.REMOVED for
>> ViewHelper automated register/unregister. Maybe we can have a
>> CaingormViewBase class with support for these, or perhaps we can use the
>> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
>> be all that is needed, but it may not always work the same.
>>
>> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
>> permissive (
>> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt) -
>> It seems to be to be similar to others like MIT etc, but I don't know
>> specifically what the rules are for Apache with that licence (in terms of
>> possibility to include in Royale itself).
>>
>>
>>
>>
>>
>> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
>> wrote:
>>
>>> Alex :
>>>
>>> In flex use the swc. I am seeing the same thing that you are commenting,
>>> I do not understand where it assigns the remote objects to the
>>> ServiceLocator. This would have to be added to the "services" attribute of
>>> the RemoteObjects class. I will try to assign by code without using the
>>> mxml to see if it does not generate the error "null0".
>>>
>>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>>> but the cause is that ServiceLocator does not have a default property. Did
>>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>>> mx:RemoteObject?
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132948281&sdata=jHABq2xbIpH9Q6aiYAWl1u23LkdalccZkE7uIbyJy3E%3D&reserved=0>,
>>>> and change.
>>>>
>>>>
>>>>
>>>> import flash.utils.describeType;
>>>>
>>>> --> import org.apache.royale.reflection.describeType;
>>>>
>>>> import flash.utils.Dictionary;
>>>>
>>>> --> import org.apache.royale.utils.ObjectMap;
>>>>
>>>>
>>>>
>>>> And this method
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> /**
>>>>
>>>>
>>>>
>>>> * Return all the accessors on this object.
>>>>
>>>>
>>>>
>>>> * @param serviceLocator the IServiceLocator instance.
>>>>
>>>>
>>>>
>>>> * @return this object's accessors.
>>>>
>>>>
>>>>
>>>> */
>>>>
>>>>
>>>>
>>>> protected
>>>>
>>>> function getAccessors(
>>>>
>>>> serviceLocator : IServiceLocator ) :
>>>>
>>>> XMLList
>>>>
>>>>
>>>>
>>>> {
>>>>
>>>>
>>>>
>>>> /*
>>>>
>>>>
>>>>
>>>> var description : XML = describeType( serviceLocator );
>>>>
>>>>
>>>>
>>>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>>>> ).@name;
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> return accessors;
>>>>
>>>>
>>>>
>>>> */
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> return describeType( serviceLocator).accessors(@access ==
>>>>
>>>> "readwrite" ).@name;
>>>>
>>>>
>>>>
>>>> }
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *Carlos Rovira <ca...@apache.org>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>> Hi,
>>>>
>>>>
>>>>
>>>> Cairngorm depends on Flash APIs, so make a Royale migration could be
>>>> not easy, or requires some expertise.
>>>>
>>>> You can use Crux instead that has support for Cairngorm style Commands.
>>>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>>>> Royale, and supports much more like dependency injection, Inversion of
>>>> control, event handling, ...
>>>>
>>>> You have 3 examples in the examples/crux folder you can check.
>>>>
>>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>>> Cairngorm
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>>> gustavodecarli@gmail.com>) escribió:
>>>>
>>>> Alex
>>>>
>>>>
>>>>
>>>> <version>0.9.7-SNAPSHOT</version>
>>>>
>>>>
>>>>
>>>> Thank
>>>>
>>>>
>>>>
>>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>>> escribió:
>>>>
>>>> What version of the compiler are you using?
>>>>
>>>>
>>>>
>>>> What does the ServiceLocator source look like? It might be an issue
>>>> with defaultProperties for non-DOM objects.
>>>>
>>>>
>>>>
>>>> -Alex
>>>>
>>>>
>>>>
>>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>>> *Subject: *Cairngorm problem add remote object MXML.
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>>>> the construction of the ServiceLocator, I understand that it is an error of
>>>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>>
>>>> Thank
>>>>
>>>> Gustavo.
>>>>
>>>>
>>>>
>>>> *1. CODE *
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <?xml version="1.0" encoding="utf-8"?>
>>>>
>>>>
>>>>
>>>> <cairngorm:ServiceLocator
>>>>
>>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132958276&sdata=D2z6jFGBTx4%2BBwOqQ4XwVSKQ0UcBb6eKavH2T0YYOA4%3D&reserved=0>
>>>> "
>>>>
>>>>
>>>>
>>>> xmlns:mx="library://ns.apache.org/royale/mx
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=RXTRBxfU2GmONGZEMCb%2B4pdF1BIv20ZcCXskhvQ7XPw%3D&reserved=0>
>>>> "
>>>>
>>>>
>>>>
>>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> <mx:RemoteObject
>>>>
>>>> id="srvSeguridades"
>>>>
>>>>
>>>>
>>>> destination="seguridades"
>>>>
>>>>
>>>>
>>>> result="event.token.resultHandler(event)"
>>>>
>>>>
>>>>
>>>> fault="event.token.faultHandler(event)"
>>>>
>>>>
>>>>
>>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> </cairngorm:ServiceLocator>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> *2. LINE OF ERROR (RED)*
>>>>
>>>> /
>>>>
>>>>
>>>>
>>>> **
>>>> * @constructor
>>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>>> */
>>>> services.Servicio = function() {
>>>> services.Servicio.base(this, 'constructor');
>>>>
>>>> /**
>>>> * @private
>>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>>> */
>>>> this.srvSeguridades_;
>>>>
>>>> /**
>>>> * @private
>>>> * @type {Array}
>>>> */
>>>> this.mxmldd;
>>>>
>>>> /**
>>>> * @private
>>>> * @type {Array}
>>>> */
>>>> this.mxmldp;
>>>>
>>>> this.generateMXMLAttributes
>>>> ([1,
>>>> mx.rpc.remoting.mxml.RemoteObject,
>>>> 3,
>>>> 'id',
>>>> true,
>>>> 'srvSeguridades',
>>>> 'destination',
>>>> true,
>>>> 'seguridades',
>>>> 'endpoint',
>>>> true,
>>>> 'http://localhost:8080/messagebroker/amf',
>>>> 0,
>>>> 2,
>>>> 'result',
>>>> this.$EH0,
>>>> 'fault',
>>>> this.$EH1,
>>>> null0, <- ERROR
>>>> 0
>>>> ]);
>>>>
>>>> };
>>>>
>>>>
>>>>
>>>>
>>>>
>>>> 3. Trace console log
>>>>
>>>>
>>>>
>>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>>> at new services.Servicio (Servicio.js:61)
>>>> at
>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>>> (MXMLDataInterpreter.js:126)
>>>> at
>>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>>> (MXMLDataInterpreter.js:271)
>>>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>>> at
>>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>>> (UIBase.js:402)
>>>>
>>>>
>>>>
>>>>
>>>> --
>>>>
>>>> Carlos Rovira
>>>>
>>>> http://about.me/carlosrovira
>>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=XhkJr%2Bar3%2Fpt4hFsMBYUB3AWiWMEkiQjdBSpNhRDP4o%3D&reserved=0>
>>>>
>>>>
>>>>
>>>> --
> Shoichiro Takeshita
> 武下 祥一郎
>
Re: Cairngorm problem add remote object MXML.
Posted by Takeshita Shoichiro <jl...@gmail.com>.
Greg,
Thanks for your work. We already have your Crux framework replacing
Cairngorm, it is great if Cairngorm works with Royale. It will save a
plenty of time of emulation work.
2020年2月6日(木) 12:33 Greg Dove <gr...@gmail.com>:
>
> There does not appear to be a default property, like an array to put the
> 'children' in. I think it just creates the children as instances and makes
> sure they have id properties on the mxml-generated subclass that the
> instances are assigned to.
>
> The services are then identified and categorised by iterating the
> accessors of the ServiceLocator subclass via reflection and checking their
> types and then registering them.
> Although it is and mxml instance of ServiceLocator, it is also an enforced
> singleton which is accessed elsewhere from code. At least that is how it
> appears to be set up to me.
>
> I already took a look at the code and have made (not many) local changes
> and have the Cairngorm swc compiling via maven for both js and swf. I have
> not tested it. Things like weak event listeners are gone.
> The main issue I think will be the Event.ADDED and Event.REMOVED for
> ViewHelper automated register/unregister. Maybe we can have a
> CaingormViewBase class with support for these, or perhaps we can use the
> ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
> be all that is needed, but it may not always work the same.
>
> I'll try to tidy it up and share it tomorrow. The licence is BSD and is
> permissive (
> https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt) -
> It seems to be to be similar to others like MIT etc, but I don't know
> specifically what the rules are for Apache with that licence (in terms of
> possibility to include in Royale itself).
>
>
>
>
>
> On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
> wrote:
>
>> Alex :
>>
>> In flex use the swc. I am seeing the same thing that you are commenting,
>> I do not understand where it assigns the remote objects to the
>> ServiceLocator. This would have to be added to the "services" attribute of
>> the RemoteObjects class. I will try to assign by code without using the
>> mxml to see if it does not generate the error "null0".
>>
>> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>>> but the cause is that ServiceLocator does not have a default property. Did
>>> your MXML work in Flex? What ServiceLocator property would be assigned the
>>> mx:RemoteObject?
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>> I download https://sourceforge.net/adobe/cairngorm/code/
>>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132948281&sdata=jHABq2xbIpH9Q6aiYAWl1u23LkdalccZkE7uIbyJy3E%3D&reserved=0>,
>>> and change.
>>>
>>>
>>>
>>> import flash.utils.describeType;
>>>
>>> --> import org.apache.royale.reflection.describeType;
>>>
>>> import flash.utils.Dictionary;
>>>
>>> --> import org.apache.royale.utils.ObjectMap;
>>>
>>>
>>>
>>> And this method
>>>
>>>
>>>
>>>
>>>
>>> /**
>>>
>>>
>>>
>>> * Return all the accessors on this object.
>>>
>>>
>>>
>>> * @param serviceLocator the IServiceLocator instance.
>>>
>>>
>>>
>>> * @return this object's accessors.
>>>
>>>
>>>
>>> */
>>>
>>>
>>>
>>> protected
>>>
>>> function getAccessors(
>>>
>>> serviceLocator : IServiceLocator ) :
>>>
>>> XMLList
>>>
>>>
>>>
>>> {
>>>
>>>
>>>
>>> /*
>>>
>>>
>>>
>>> var description : XML = describeType( serviceLocator );
>>>
>>>
>>>
>>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>>> ).@name;
>>>
>>>
>>>
>>>
>>>
>>> return accessors;
>>>
>>>
>>>
>>> */
>>>
>>>
>>>
>>>
>>>
>>> return describeType( serviceLocator).accessors(@access ==
>>>
>>> "readwrite" ).@name;
>>>
>>>
>>>
>>> }
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> Carlos, What Flash APIs is Cairngorm dependent on?
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *Carlos Rovira <ca...@apache.org>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>> Hi,
>>>
>>>
>>>
>>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>>> easy, or requires some expertise.
>>>
>>> You can use Crux instead that has support for Cairngorm style Commands.
>>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>>> Royale, and supports much more like dependency injection, Inversion of
>>> control, event handling, ...
>>>
>>> You have 3 examples in the examples/crux folder you can check.
>>>
>>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>>> Cairngorm
>>>
>>>
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>>> gustavodecarli@gmail.com>) escribió:
>>>
>>> Alex
>>>
>>>
>>>
>>> <version>0.9.7-SNAPSHOT</version>
>>>
>>>
>>>
>>> Thank
>>>
>>>
>>>
>>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>>> escribió:
>>>
>>> What version of the compiler are you using?
>>>
>>>
>>>
>>> What does the ServiceLocator source look like? It might be an issue
>>> with defaultProperties for non-DOM objects.
>>>
>>>
>>>
>>> -Alex
>>>
>>>
>>>
>>> *From: *De Carli Gustavo <gu...@gmail.com>
>>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>>> *Subject: *Cairngorm problem add remote object MXML.
>>>
>>>
>>>
>>>
>>>
>>>
>>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>>> the construction of the ServiceLocator, I understand that it is an error of
>>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>>
>>> Thank
>>>
>>> Gustavo.
>>>
>>>
>>>
>>> *1. CODE *
>>>
>>>
>>>
>>>
>>>
>>> <?xml version="1.0" encoding="utf-8"?>
>>>
>>>
>>>
>>> <cairngorm:ServiceLocator
>>>
>>> xmlns:fx="http://ns.adobe.com/mxml/2009
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132958276&sdata=D2z6jFGBTx4%2BBwOqQ4XwVSKQ0UcBb6eKavH2T0YYOA4%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:mx="library://ns.apache.org/royale/mx
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=RXTRBxfU2GmONGZEMCb%2B4pdF1BIv20ZcCXskhvQ7XPw%3D&reserved=0>
>>> "
>>>
>>>
>>>
>>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>>
>>>
>>>
>>>
>>>
>>> <mx:RemoteObject
>>>
>>> id="srvSeguridades"
>>>
>>>
>>>
>>> destination="seguridades"
>>>
>>>
>>>
>>> result="event.token.resultHandler(event)"
>>>
>>>
>>>
>>> fault="event.token.faultHandler(event)"
>>>
>>>
>>>
>>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>>
>>>
>>>
>>>
>>>
>>> </cairngorm:ServiceLocator>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>>
>>> *2. LINE OF ERROR (RED)*
>>>
>>> /
>>>
>>>
>>>
>>> **
>>> * @constructor
>>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>>> */
>>> services.Servicio = function() {
>>> services.Servicio.base(this, 'constructor');
>>>
>>> /**
>>> * @private
>>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>>> */
>>> this.srvSeguridades_;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldd;
>>>
>>> /**
>>> * @private
>>> * @type {Array}
>>> */
>>> this.mxmldp;
>>>
>>> this.generateMXMLAttributes
>>> ([1,
>>> mx.rpc.remoting.mxml.RemoteObject,
>>> 3,
>>> 'id',
>>> true,
>>> 'srvSeguridades',
>>> 'destination',
>>> true,
>>> 'seguridades',
>>> 'endpoint',
>>> true,
>>> 'http://localhost:8080/messagebroker/amf',
>>> 0,
>>> 2,
>>> 'result',
>>> this.$EH0,
>>> 'fault',
>>> this.$EH1,
>>> null0, <- ERROR
>>> 0
>>> ]);
>>>
>>> };
>>>
>>>
>>>
>>>
>>>
>>> 3. Trace console log
>>>
>>>
>>>
>>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>>> at new services.Servicio (Servicio.js:61)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>>> (MXMLDataInterpreter.js:126)
>>> at
>>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>>> (MXMLDataInterpreter.js:271)
>>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>>> at
>>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>>> (UIBase.js:402)
>>>
>>>
>>>
>>>
>>> --
>>>
>>> Carlos Rovira
>>>
>>> http://about.me/carlosrovira
>>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=XhkJr%2Bar3%2Fpt4hFsMBYUB3AWiWMEkiQjdBSpNhRDP4o%3D&reserved=0>
>>>
>>>
>>>
>>> --
Shoichiro Takeshita
武下 祥一郎
Re: Cairngorm problem add remote object MXML.
Posted by Alex Harui <ah...@adobe.com>.
Good to know. I will see if I can get the compiler to handle that correctly. I didn’t know that was a valid scenario.
From: Greg Dove <gr...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, February 5, 2020 at 7:33 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Cairngorm problem add remote object MXML.
There does not appear to be a default property, like an array to put the 'children' in. I think it just creates the children as instances and makes sure they have id properties on the mxml-generated subclass that the instances are assigned to.
The services are then identified and categorised by iterating the accessors of the ServiceLocator subclass via reflection and checking their types and then registering them.
Although it is and mxml instance of ServiceLocator, it is also an enforced singleton which is accessed elsewhere from code. At least that is how it appears to be set up to me.
I already took a look at the code and have made (not many) local changes and have the Cairngorm swc compiling via maven for both js and swf. I have not tested it. Things like weak event listeners are gone.
The main issue I think will be the Event.ADDED and Event.REMOVED for ViewHelper automated register/unregister. Maybe we can have a CaingormViewBase class with support for these, or perhaps we can use the ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might be all that is needed, but it may not always work the same.
I'll try to tidy it up and share it tomorrow. The licence is BSD and is permissive (https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2FHEAD%2Ftree%2Fcairngorm%2Ftrunk%2Fframeworks%2Fcairngorm%2FLicense.txt&data=02%7C01%7Caharui%40adobe.com%7C2fe18768c44f425da38508d7aab54b0c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165567937202553&sdata=R%2BwcTLD56eWn4zeku2z6FNY2%2BSRQ2x0EBd0nM5sw38c%3D&reserved=0>) - It seems to be to be similar to others like MIT etc, but I don't know specifically what the rules are for Apache with that licence (in terms of possibility to include in Royale itself).
On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>> wrote:
Alex :
In flex use the swc. I am seeing the same thing that you are commenting, I do not understand where it assigns the remote objects to the ServiceLocator. This would have to be added to the "services" attribute of the RemoteObjects class. I will try to assign by code without using the mxml to see if it does not generate the error "null0".
El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>>) escribió:
I grabbed ServiceLocator.as and was able to produce the null0 problem, but the cause is that ServiceLocator does not have a default property. Did your MXML work in Flex? What ServiceLocator property would be assigned the mx:RemoteObject?
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 12:00 PM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
I download https://sourceforge.net/adobe/cairngorm/code/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7C2fe18768c44f425da38508d7aab54b0c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165567937202553&sdata=L1iQGvIeKgs8iiPlYZufzLCVLOltWIc%2BVMne1oafoA8%3D&reserved=0>, and change.
import flash.utils.describeType;
--> import org.apache.royale.reflection.describeType;
import flash.utils.Dictionary;
--> import org.apache.royale.utils.ObjectMap;
And this method
/**
* Return all the accessors on this object.
* @param serviceLocator the IServiceLocator instance.
* @return this object's accessors.
*/
protected
function getAccessors(
serviceLocator : IServiceLocator ) :
XMLList
{
/*
var description : XML = describeType( serviceLocator );
var accessors : XMLList = description.accessor.( @access == "readwrite" ).@name;
return accessors;
*/
return describeType( serviceLocator).accessors(@access ==
"readwrite" ).@name;
}
El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>>) escribió:
Carlos, What Flash APIs is Cairngorm dependent on?
-Alex
From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 10:05 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Hi,
Cairngorm depends on Flash APIs, so make a Royale migration could be not easy, or requires some expertise.
You can use Crux instead that has support for Cairngorm style Commands. Crux is the same as Swiz Framework for Flex but rewritten to work in Royale, and supports much more like dependency injection, Inversion of control, event handling, ...
You have 3 examples in the examples/crux folder you can check.
I recommend you Crux over Cairngorm since Swiz was born to substitute Cairngorm
El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<gu...@gmail.com>>) escribió:
Alex
<version>0.9.7-SNAPSHOT</version>
Thank
El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>>) escribió:
What version of the compiler are you using?
What does the ServiceLocator source look like? It might be an issue with defaultProperties for non-DOM objects.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 7:35 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the construction of the ServiceLocator, I understand that it is an error of the MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
1. CODE
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C2fe18768c44f425da38508d7aab54b0c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165567937212548&sdata=psS7VZWb2xNnODeQYSokZCLQiX9fu3J2BbmoRY6L7zg%3D&reserved=0>"
xmlns:mx="library://ns.apache.org/royale/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7C2fe18768c44f425da38508d7aab54b0c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165567937212548&sdata=T63L0FhYYuaAQgeWMGjPlj%2Bw70avYjxpGp4tY8JjXRI%3D&reserved=0>"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject
id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
2. LINE OF ERROR (RED)
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray (MXMLDataInterpreter.js:126)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances (MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement (UIBase.js:402)
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7C2fe18768c44f425da38508d7aab54b0c%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165567937222548&sdata=acQ1VFcFmkdmF9xHudjSJqVOoOKeB2M2O1wREo0dA1g%3D&reserved=0>
Re: Cairngorm problem add remote object MXML.
Posted by Greg Dove <gr...@gmail.com>.
There does not appear to be a default property, like an array to put the
'children' in. I think it just creates the children as instances and makes
sure they have id properties on the mxml-generated subclass that the
instances are assigned to.
The services are then identified and categorised by iterating the accessors
of the ServiceLocator subclass via reflection and checking their types and
then registering them.
Although it is and mxml instance of ServiceLocator, it is also an enforced
singleton which is accessed elsewhere from code. At least that is how it
appears to be set up to me.
I already took a look at the code and have made (not many) local changes
and have the Cairngorm swc compiling via maven for both js and swf. I have
not tested it. Things like weak event listeners are gone.
The main issue I think will be the Event.ADDED and Event.REMOVED for
ViewHelper automated register/unregister. Maybe we can have a
CaingormViewBase class with support for these, or perhaps we can use the
ADDED/REMOVED_FROM_STAGE emulation support that Crux uses, and that might
be all that is needed, but it may not always work the same.
I'll try to tidy it up and share it tomorrow. The licence is BSD and is
permissive (
https://sourceforge.net/adobe/cairngorm/code/HEAD/tree/cairngorm/trunk/frameworks/cairngorm/License.txt)
-
It seems to be to be similar to others like MIT etc, but I don't know
specifically what the rules are for Apache with that licence (in terms of
possibility to include in Royale itself).
On Thu, Feb 6, 2020 at 3:40 PM De Carli Gustavo <gu...@gmail.com>
wrote:
> Alex :
>
> In flex use the swc. I am seeing the same thing that you are commenting, I
> do not understand where it assigns the remote objects to the
> ServiceLocator. This would have to be added to the "services" attribute of
> the RemoteObjects class. I will try to assign by code without using the
> mxml to see if it does not generate the error "null0".
>
> El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>)
> escribió:
>
>> I grabbed ServiceLocator.as and was able to produce the null0 problem,
>> but the cause is that ServiceLocator does not have a default property. Did
>> your MXML work in Flex? What ServiceLocator property would be assigned the
>> mx:RemoteObject?
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 12:00 PM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>> I download https://sourceforge.net/adobe/cairngorm/code/
>> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132948281&sdata=jHABq2xbIpH9Q6aiYAWl1u23LkdalccZkE7uIbyJy3E%3D&reserved=0>,
>> and change.
>>
>>
>>
>> import flash.utils.describeType;
>>
>> --> import org.apache.royale.reflection.describeType;
>>
>> import flash.utils.Dictionary;
>>
>> --> import org.apache.royale.utils.ObjectMap;
>>
>>
>>
>> And this method
>>
>>
>>
>>
>>
>> /**
>>
>>
>>
>> * Return all the accessors on this object.
>>
>>
>>
>> * @param serviceLocator the IServiceLocator instance.
>>
>>
>>
>> * @return this object's accessors.
>>
>>
>>
>> */
>>
>>
>>
>> protected
>>
>> function getAccessors(
>>
>> serviceLocator : IServiceLocator ) :
>>
>> XMLList
>>
>>
>>
>> {
>>
>>
>>
>> /*
>>
>>
>>
>> var description : XML = describeType( serviceLocator );
>>
>>
>>
>> var accessors : XMLList = description.accessor.( @access == "readwrite"
>> ).@name;
>>
>>
>>
>>
>>
>> return accessors;
>>
>>
>>
>> */
>>
>>
>>
>>
>>
>> return describeType( serviceLocator).accessors(@access ==
>>
>> "readwrite" ).@name;
>>
>>
>>
>> }
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> Carlos, What Flash APIs is Cairngorm dependent on?
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *Carlos Rovira <ca...@apache.org>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>> Hi,
>>
>>
>>
>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>> easy, or requires some expertise.
>>
>> You can use Crux instead that has support for Cairngorm style Commands.
>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>> Royale, and supports much more like dependency injection, Inversion of
>> control, event handling, ...
>>
>> You have 3 examples in the examples/crux folder you can check.
>>
>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>> Cairngorm
>>
>>
>>
>>
>>
>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>> gustavodecarli@gmail.com>) escribió:
>>
>> Alex
>>
>>
>>
>> <version>0.9.7-SNAPSHOT</version>
>>
>>
>>
>> Thank
>>
>>
>>
>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> What version of the compiler are you using?
>>
>>
>>
>> What does the ServiceLocator source look like? It might be an issue with
>> defaultProperties for non-DOM objects.
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>>
>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>> the construction of the ServiceLocator, I understand that it is an error of
>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>
>> Thank
>>
>> Gustavo.
>>
>>
>>
>> *1. CODE *
>>
>>
>>
>>
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>
>>
>>
>> <cairngorm:ServiceLocator
>>
>> xmlns:fx="http://ns.adobe.com/mxml/2009
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132958276&sdata=D2z6jFGBTx4%2BBwOqQ4XwVSKQ0UcBb6eKavH2T0YYOA4%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:mx="library://ns.apache.org/royale/mx
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=RXTRBxfU2GmONGZEMCb%2B4pdF1BIv20ZcCXskhvQ7XPw%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>
>>
>>
>>
>>
>> <mx:RemoteObject
>>
>> id="srvSeguridades"
>>
>>
>>
>> destination="seguridades"
>>
>>
>>
>> result="event.token.resultHandler(event)"
>>
>>
>>
>> fault="event.token.faultHandler(event)"
>>
>>
>>
>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>
>>
>>
>>
>>
>> </cairngorm:ServiceLocator>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *2. LINE OF ERROR (RED)*
>>
>> /
>>
>>
>>
>> **
>> * @constructor
>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>> */
>> services.Servicio = function() {
>> services.Servicio.base(this, 'constructor');
>>
>> /**
>> * @private
>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>> */
>> this.srvSeguridades_;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldd;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldp;
>>
>> this.generateMXMLAttributes
>> ([1,
>> mx.rpc.remoting.mxml.RemoteObject,
>> 3,
>> 'id',
>> true,
>> 'srvSeguridades',
>> 'destination',
>> true,
>> 'seguridades',
>> 'endpoint',
>> true,
>> 'http://localhost:8080/messagebroker/amf',
>> 0,
>> 2,
>> 'result',
>> this.$EH0,
>> 'fault',
>> this.$EH1,
>> null0, <- ERROR
>> 0
>> ]);
>>
>> };
>>
>>
>>
>>
>>
>> 3. Trace console log
>>
>>
>>
>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>> at new services.Servicio (Servicio.js:61)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>> (MXMLDataInterpreter.js:126)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>> (MXMLDataInterpreter.js:271)
>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>> at
>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>> (UIBase.js:402)
>>
>>
>>
>>
>> --
>>
>> Carlos Rovira
>>
>> http://about.me/carlosrovira
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=XhkJr%2Bar3%2Fpt4hFsMBYUB3AWiWMEkiQjdBSpNhRDP4o%3D&reserved=0>
>>
>>
>>
>>
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Alex :
In flex use the swc. I am seeing the same thing that you are commenting, I
do not understand where it assigns the remote objects to the
ServiceLocator. This would have to be added to the "services" attribute of
the RemoteObjects class. I will try to assign by code without using the
mxml to see if it does not generate the error "null0".
El mié., 5 feb. 2020 a las 23:15, Alex Harui (<ah...@adobe.com>) escribió:
> I grabbed ServiceLocator.as and was able to produce the null0 problem, but
> the cause is that ServiceLocator does not have a default property. Did
> your MXML work in Flex? What ServiceLocator property would be assigned the
> mx:RemoteObject?
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 12:00 PM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
>
>
> I download https://sourceforge.net/adobe/cairngorm/code/
> <https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132948281&sdata=jHABq2xbIpH9Q6aiYAWl1u23LkdalccZkE7uIbyJy3E%3D&reserved=0>,
> and change.
>
>
>
> import flash.utils.describeType;
>
> --> import org.apache.royale.reflection.describeType;
>
> import flash.utils.Dictionary;
>
> --> import org.apache.royale.utils.ObjectMap;
>
>
>
> And this method
>
>
>
>
>
> /**
>
>
>
> * Return all the accessors on this object.
>
>
>
> * @param serviceLocator the IServiceLocator instance.
>
>
>
> * @return this object's accessors.
>
>
>
> */
>
>
>
> protected
>
> function getAccessors(
>
> serviceLocator : IServiceLocator ) :
>
> XMLList
>
>
>
> {
>
>
>
> /*
>
>
>
> var description : XML = describeType( serviceLocator );
>
>
>
> var accessors : XMLList = description.accessor.( @access == "readwrite"
> ).@name;
>
>
>
>
>
> return accessors;
>
>
>
> */
>
>
>
>
>
> return describeType( serviceLocator).accessors(@access ==
>
> "readwrite" ).@name;
>
>
>
> }
>
>
>
>
>
>
>
>
>
> El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> Carlos, What Flash APIs is Cairngorm dependent on?
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Hi,
>
>
>
> Cairngorm depends on Flash APIs, so make a Royale migration could be not
> easy, or requires some expertise.
>
> You can use Crux instead that has support for Cairngorm style Commands.
> Crux is the same as Swiz Framework for Flex but rewritten to work in
> Royale, and supports much more like dependency injection, Inversion of
> control, event handling, ...
>
> You have 3 examples in the examples/crux folder you can check.
>
> I recommend you Crux over Cairngorm since Swiz was born to substitute
> Cairngorm
>
>
>
>
>
> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
> gustavodecarli@gmail.com>) escribió:
>
> Alex
>
>
>
> <version>0.9.7-SNAPSHOT</version>
>
>
>
> Thank
>
>
>
> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> What version of the compiler are you using?
>
>
>
> What does the ServiceLocator source look like? It might be an issue with
> defaultProperties for non-DOM objects.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 7:35 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Cairngorm problem add remote object MXML.
>
>
>
>
>
>
> I am trying to transcribe gairngorm, at runtime it gives me an error in
> the construction of the ServiceLocator, I understand that it is an error of
> the MXMLDataInterpreter. Anyone have any idea of the problem.
>
> Thank
>
> Gustavo.
>
>
>
> *1. CODE *
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <cairngorm:ServiceLocator
>
> xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132958276&sdata=D2z6jFGBTx4%2BBwOqQ4XwVSKQ0UcBb6eKavH2T0YYOA4%3D&reserved=0>
> "
>
>
>
> xmlns:mx="library://ns.apache.org/royale/mx
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=RXTRBxfU2GmONGZEMCb%2B4pdF1BIv20ZcCXskhvQ7XPw%3D&reserved=0>
> "
>
>
>
> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>
>
>
>
>
> <mx:RemoteObject
>
> id="srvSeguridades"
>
>
>
> destination="seguridades"
>
>
>
> result="event.token.resultHandler(event)"
>
>
>
> fault="event.token.faultHandler(event)"
>
>
>
> endpoint="http://localhost:8080/messagebroker/amf"/>
>
>
>
>
>
> </cairngorm:ServiceLocator>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *2. LINE OF ERROR (RED)*
>
> /
>
>
>
> **
> * @constructor
> * @extends {com.adobe.cairngorm.business.ServiceLocator}
> */
> services.Servicio = function() {
> services.Servicio.base(this, 'constructor');
>
> /**
> * @private
> * @type {mx.rpc.remoting.mxml.RemoteObject}
> */
> this.srvSeguridades_;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldd;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldp;
>
> this.generateMXMLAttributes
> ([1,
> mx.rpc.remoting.mxml.RemoteObject,
> 3,
> 'id',
> true,
> 'srvSeguridades',
> 'destination',
> true,
> 'seguridades',
> 'endpoint',
> true,
> 'http://localhost:8080/messagebroker/amf',
> 0,
> 2,
> 'result',
> this.$EH0,
> 'fault',
> this.$EH1,
> null0, <- ERROR
> 0
> ]);
>
> };
>
>
>
>
>
> 3. Trace console log
>
>
>
> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
> at new services.Servicio (Servicio.js:61)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
> (MXMLDataInterpreter.js:126)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
> (MXMLDataInterpreter.js:271)
> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
> at main.Main.mx.core.Container.createChildren (Container.js:136)
> at main.Main.mx.core.Application.createChildren (Application.js:122)
> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
> at main.Main.mx.core.Container.addedToParent (Container.js:123)
> at
> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
> (UIBase.js:402)
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=XhkJr%2Bar3%2Fpt4hFsMBYUB3AWiWMEkiQjdBSpNhRDP4o%3D&reserved=0>
>
>
>
>
Re: Cairngorm problem add remote object MXML.
Posted by Alex Harui <ah...@adobe.com>.
I grabbed ServiceLocator.as and was able to produce the null0 problem, but the cause is that ServiceLocator does not have a default property. Did your MXML work in Flex? What ServiceLocator property would be assigned the mx:RemoteObject?
-Alex
From: De Carli Gustavo <gu...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, February 5, 2020 at 12:00 PM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Cairngorm problem add remote object MXML.
I download https://sourceforge.net/adobe/cairngorm/code/<https://nam04.safelinks.protection.outlook.com/?url=https%3A%2F%2Fsourceforge.net%2Fadobe%2Fcairngorm%2Fcode%2F&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132948281&sdata=jHABq2xbIpH9Q6aiYAWl1u23LkdalccZkE7uIbyJy3E%3D&reserved=0>, and change.
import flash.utils.describeType;
--> import org.apache.royale.reflection.describeType;
import flash.utils.Dictionary;
--> import org.apache.royale.utils.ObjectMap;
And this method
/**
* Return all the accessors on this object.
* @param serviceLocator the IServiceLocator instance.
* @return this object's accessors.
*/
protected
function getAccessors(
serviceLocator : IServiceLocator ) :
XMLList
{
/*
var description : XML = describeType( serviceLocator );
var accessors : XMLList = description.accessor.( @access == "readwrite" ).@name;
return accessors;
*/
return describeType( serviceLocator).accessors(@access ==
"readwrite" ).@name;
}
El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>>) escribió:
Carlos, What Flash APIs is Cairngorm dependent on?
-Alex
From: Carlos Rovira <ca...@apache.org>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 10:05 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Re: Cairngorm problem add remote object MXML.
Hi,
Cairngorm depends on Flash APIs, so make a Royale migration could be not easy, or requires some expertise.
You can use Crux instead that has support for Cairngorm style Commands. Crux is the same as Swiz Framework for Flex but rewritten to work in Royale, and supports much more like dependency injection, Inversion of control, event handling, ...
You have 3 examples in the examples/crux folder you can check.
I recommend you Crux over Cairngorm since Swiz was born to substitute Cairngorm
El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<gu...@gmail.com>>) escribió:
Alex
<version>0.9.7-SNAPSHOT</version>
Thank
El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>>) escribió:
What version of the compiler are you using?
What does the ServiceLocator source look like? It might be an issue with defaultProperties for non-DOM objects.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 7:35 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the construction of the ServiceLocator, I understand that it is an error of the MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
1. CODE
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132958276&sdata=D2z6jFGBTx4%2BBwOqQ4XwVSKQ0UcBb6eKavH2T0YYOA4%3D&reserved=0>"
xmlns:mx="library://ns.apache.org/royale/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=RXTRBxfU2GmONGZEMCb%2B4pdF1BIv20ZcCXskhvQ7XPw%3D&reserved=0>"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject
id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
2. LINE OF ERROR (RED)
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray (MXMLDataInterpreter.js:126)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances (MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement (UIBase.js:402)
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Ce69b06cf11f748f1c34408d7aa7601ec%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165296132968272&sdata=XhkJr%2Bar3%2Fpt4hFsMBYUB3AWiWMEkiQjdBSpNhRDP4o%3D&reserved=0>
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
I download https://sourceforge.net/adobe/cairngorm/code/, and change.
import flash.utils.describeType;
--> import org.apache.royale.reflection.describeType;
import flash.utils.Dictionary;
--> import org.apache.royale.utils.ObjectMap;
And this method
/**
* Return all the accessors on this object.
* @param serviceLocator the IServiceLocator instance.
* @return this object's accessors.
*/
protected function getAccessors( serviceLocator : IServiceLocator ) :
XMLList
{
/*
var description : XML = describeType( serviceLocator );
var accessors : XMLList = description.accessor.( @access == "readwrite"
).@name;
return accessors;
*/
return describeType( serviceLocator).accessors(@access == "readwrite"
).@name;
}
El mié., 5 feb. 2020 a las 16:04, Alex Harui (<ah...@adobe.com>) escribió:
> Carlos, What Flash APIs is Cairngorm dependent on?
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Hi,
>
>
>
> Cairngorm depends on Flash APIs, so make a Royale migration could be not
> easy, or requires some expertise.
>
> You can use Crux instead that has support for Cairngorm style Commands.
> Crux is the same as Swiz Framework for Flex but rewritten to work in
> Royale, and supports much more like dependency injection, Inversion of
> control, event handling, ...
>
> You have 3 examples in the examples/crux folder you can check.
>
> I recommend you Crux over Cairngorm since Swiz was born to substitute
> Cairngorm
>
>
>
>
>
> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
> gustavodecarli@gmail.com>) escribió:
>
> Alex
>
>
>
> <version>0.9.7-SNAPSHOT</version>
>
>
>
> Thank
>
>
>
> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> What version of the compiler are you using?
>
>
>
> What does the ServiceLocator source look like? It might be an issue with
> defaultProperties for non-DOM objects.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 7:35 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Cairngorm problem add remote object MXML.
>
>
>
>
>
>
> I am trying to transcribe gairngorm, at runtime it gives me an error in
> the construction of the ServiceLocator, I understand that it is an error of
> the MXMLDataInterpreter. Anyone have any idea of the problem.
>
> Thank
>
> Gustavo.
>
>
>
> *1. CODE *
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <cairngorm:ServiceLocator
>
> xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068663207&sdata=JLOGFIXWyvXPtTk3P2zPQLI9K3fVUv61%2B%2FHjYMP2KLE%3D&reserved=0>
> "
>
>
>
> xmlns:mx="library://ns.apache.org/royale/mx
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=TXCVez5kEcJgl2%2FsWRjS8X7HpV%2BnZGITwRJyed2GumI%3D&reserved=0>
> "
>
>
>
> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>
>
>
>
>
> <mx:RemoteObject
>
> id="srvSeguridades"
>
>
>
> destination="seguridades"
>
>
>
> result="event.token.resultHandler(event)"
>
>
>
> fault="event.token.faultHandler(event)"
>
>
>
> endpoint="http://localhost:8080/messagebroker/amf"/>
>
>
>
>
>
> </cairngorm:ServiceLocator>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *2. LINE OF ERROR (RED)*
>
> /
>
>
>
> **
> * @constructor
> * @extends {com.adobe.cairngorm.business.ServiceLocator}
> */
> services.Servicio = function() {
> services.Servicio.base(this, 'constructor');
>
> /**
> * @private
> * @type {mx.rpc.remoting.mxml.RemoteObject}
> */
> this.srvSeguridades_;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldd;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldp;
>
> this.generateMXMLAttributes
> ([1,
> mx.rpc.remoting.mxml.RemoteObject,
> 3,
> 'id',
> true,
> 'srvSeguridades',
> 'destination',
> true,
> 'seguridades',
> 'endpoint',
> true,
> 'http://localhost:8080/messagebroker/amf',
> 0,
> 2,
> 'result',
> this.$EH0,
> 'fault',
> this.$EH1,
> null0, <- ERROR
> 0
> ]);
>
> };
>
>
>
>
>
> 3. Trace console log
>
>
>
> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
> at new services.Servicio (Servicio.js:61)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
> (MXMLDataInterpreter.js:126)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
> (MXMLDataInterpreter.js:271)
> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
> at main.Main.mx.core.Container.createChildren (Container.js:136)
> at main.Main.mx.core.Application.createChildren (Application.js:122)
> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
> at main.Main.mx.core.Container.addedToParent (Container.js:123)
> at
> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
> (UIBase.js:402)
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=2pi7HsEBr5zw9jCg%2Fu4OQvPQs9Ys5TFWbQeIZf1IG88%3D&reserved=0>
>
>
>
Re: Cairngorm problem add remote object MXML.
Posted by Takeshita Shoichiro <jl...@gmail.com>.
Hi, F.Y.I.
The following is a list of imports in the cairngorm source code.
import com.adobe.cairngorm.AllCairngormTests;
import com.adobe.cairngorm.business.AbstractServices;
import com.adobe.cairngorm.business.IServiceLocator;;
import com.adobe.cairngorm.business.ServiceLocator;
import com.adobe.cairngorm.CairngormError;
import com.adobe.cairngorm.CairngormMessageCodes;
import com.adobe.cairngorm.commands.Command;
import com.adobe.cairngorm.commands.ICommand;
import com.adobe.cairngorm.control.CairngormEvent;
import com.adobe.cairngorm.control.CairngormEventDispatcher;
import com.adobe.cairngorm.control.TestCairngormEvent;
import com.adobe.cairngorm.control.TestCairngormEventDispatcher;
import com.adobe.cairngorm.control.TestFrontController;
import com.adobe.cairngorm.mocks.MockICommand;
import com.adobe.cairngorm.vo.IValueObject;
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.IEventDispatcher;
import flash.utils.describeType;
import flash.utils.Dictionary;
import flash.utils.getQualifiedClassName;
import flexunit.framework.Test;
import flexunit.framework.TestCase;
import flexunit.framework.TestSuite;
import mx.core.IMXMLObject;
import mx.core.mx_internal;
import mx.data.DataService;
import mx.messaging.Consumer;
import mx.messaging.MessageAgent;
import mx.messaging.Producer;
import mx.resources.ResourceManager;
import mx.rpc.AbstractInvoker;
import mx.rpc.AbstractService;
import mx.rpc.http.HTTPService;
import mx.rpc.remoting.RemoteObject;
import mx.rpc.soap.WebService;
import mx.utils.StringUtil;
On Thu, Feb 6, 2020 at 8:49 AM Carlos Rovira <ca...@apache.org>
wrote:
> Hi Alex,
>
> I don't have the Cairngorm code at hand, we left it long time ago (maybe
> around 2008) in favor of Swiz that was the new generation of frameworks at
> that time that brings IOC, DI...
>
> But I remember there was many flash APIs involved. Maybe most of them are
> now emulated in Royale and could be not difficult to do (I,e Reflection).
> Maybe other things regarding add to stage events...don't remember well.
> Cairngorm was just few classes, so it could be ported in this project with
> not much effort for an experienced Royale developer, but not for someone
> new here.
>
> HTH
>
> Carlos
>
> El mié., 5 feb. 2020 a las 20:04, Alex Harui (<ah...@adobe.com>)
> escribió:
>
>> Carlos, What Flash APIs is Cairngorm dependent on?
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *Carlos Rovira <ca...@apache.org>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 10:05 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Re: Cairngorm problem add remote object MXML.
>>
>>
>>
>> Hi,
>>
>>
>>
>> Cairngorm depends on Flash APIs, so make a Royale migration could be not
>> easy, or requires some expertise.
>>
>> You can use Crux instead that has support for Cairngorm style Commands.
>> Crux is the same as Swiz Framework for Flex but rewritten to work in
>> Royale, and supports much more like dependency injection, Inversion of
>> control, event handling, ...
>>
>> You have 3 examples in the examples/crux folder you can check.
>>
>> I recommend you Crux over Cairngorm since Swiz was born to substitute
>> Cairngorm
>>
>>
>>
>>
>>
>> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
>> gustavodecarli@gmail.com>) escribió:
>>
>> Alex
>>
>>
>>
>> <version>0.9.7-SNAPSHOT</version>
>>
>>
>>
>> Thank
>>
>>
>>
>> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
>> escribió:
>>
>> What version of the compiler are you using?
>>
>>
>>
>> What does the ServiceLocator source look like? It might be an issue with
>> defaultProperties for non-DOM objects.
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>>
>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>> the construction of the ServiceLocator, I understand that it is an error of
>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>
>> Thank
>>
>> Gustavo.
>>
>>
>>
>> *1. CODE *
>>
>>
>>
>>
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>
>>
>>
>> <cairngorm:ServiceLocator
>>
>> xmlns:fx="http://ns.adobe.com/mxml/2009
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068663207&sdata=JLOGFIXWyvXPtTk3P2zPQLI9K3fVUv61%2B%2FHjYMP2KLE%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:mx="library://ns.apache.org/royale/mx
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=TXCVez5kEcJgl2%2FsWRjS8X7HpV%2BnZGITwRJyed2GumI%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>
>>
>>
>>
>>
>> <mx:RemoteObject
>>
>> id="srvSeguridades"
>>
>>
>>
>> destination="seguridades"
>>
>>
>>
>> result="event.token.resultHandler(event)"
>>
>>
>>
>> fault="event.token.faultHandler(event)"
>>
>>
>>
>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>
>>
>>
>>
>>
>> </cairngorm:ServiceLocator>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *2. LINE OF ERROR (RED)*
>>
>> /
>>
>>
>>
>> **
>> * @constructor
>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>> */
>> services.Servicio = function() {
>> services.Servicio.base(this, 'constructor');
>>
>> /**
>> * @private
>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>> */
>> this.srvSeguridades_;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldd;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldp;
>>
>> this.generateMXMLAttributes
>> ([1,
>> mx.rpc.remoting.mxml.RemoteObject,
>> 3,
>> 'id',
>> true,
>> 'srvSeguridades',
>> 'destination',
>> true,
>> 'seguridades',
>> 'endpoint',
>> true,
>> 'http://localhost:8080/messagebroker/amf',
>> 0,
>> 2,
>> 'result',
>> this.$EH0,
>> 'fault',
>> this.$EH1,
>> null0, <- ERROR
>> 0
>> ]);
>>
>> };
>>
>>
>>
>>
>>
>> 3. Trace console log
>>
>>
>>
>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>> at new services.Servicio (Servicio.js:61)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>> (MXMLDataInterpreter.js:126)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>> (MXMLDataInterpreter.js:271)
>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>> at
>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>> (UIBase.js:402)
>>
>>
>>
>>
>> --
>>
>> Carlos Rovira
>>
>> http://about.me/carlosrovira
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=2pi7HsEBr5zw9jCg%2Fu4OQvPQs9Ys5TFWbQeIZf1IG88%3D&reserved=0>
>>
>>
>>
>
>
> --
> Carlos Rovira
> http://about.me/carlosrovira
>
>
--
Shoichiro Takeshita
武下 祥一郎
Re: Cairngorm problem add remote object MXML.
Posted by Carlos Rovira <ca...@apache.org>.
Hi Alex,
I don't have the Cairngorm code at hand, we left it long time ago (maybe
around 2008) in favor of Swiz that was the new generation of frameworks at
that time that brings IOC, DI...
But I remember there was many flash APIs involved. Maybe most of them are
now emulated in Royale and could be not difficult to do (I,e Reflection).
Maybe other things regarding add to stage events...don't remember well.
Cairngorm was just few classes, so it could be ported in this project with
not much effort for an experienced Royale developer, but not for someone
new here.
HTH
Carlos
El mié., 5 feb. 2020 a las 20:04, Alex Harui (<ah...@adobe.com>) escribió:
> Carlos, What Flash APIs is Cairngorm dependent on?
>
>
>
> -Alex
>
>
>
> *From: *Carlos Rovira <ca...@apache.org>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 10:05 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Re: Cairngorm problem add remote object MXML.
>
>
>
> Hi,
>
>
>
> Cairngorm depends on Flash APIs, so make a Royale migration could be not
> easy, or requires some expertise.
>
> You can use Crux instead that has support for Cairngorm style Commands.
> Crux is the same as Swiz Framework for Flex but rewritten to work in
> Royale, and supports much more like dependency injection, Inversion of
> control, event handling, ...
>
> You have 3 examples in the examples/crux folder you can check.
>
> I recommend you Crux over Cairngorm since Swiz was born to substitute
> Cairngorm
>
>
>
>
>
> El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
> gustavodecarli@gmail.com>) escribió:
>
> Alex
>
>
>
> <version>0.9.7-SNAPSHOT</version>
>
>
>
> Thank
>
>
>
> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
> escribió:
>
> What version of the compiler are you using?
>
>
>
> What does the ServiceLocator source look like? It might be an issue with
> defaultProperties for non-DOM objects.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 7:35 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Cairngorm problem add remote object MXML.
>
>
>
>
>
>
> I am trying to transcribe gairngorm, at runtime it gives me an error in
> the construction of the ServiceLocator, I understand that it is an error of
> the MXMLDataInterpreter. Anyone have any idea of the problem.
>
> Thank
>
> Gustavo.
>
>
>
> *1. CODE *
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <cairngorm:ServiceLocator
>
> xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068663207&sdata=JLOGFIXWyvXPtTk3P2zPQLI9K3fVUv61%2B%2FHjYMP2KLE%3D&reserved=0>
> "
>
>
>
> xmlns:mx="library://ns.apache.org/royale/mx
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=TXCVez5kEcJgl2%2FsWRjS8X7HpV%2BnZGITwRJyed2GumI%3D&reserved=0>
> "
>
>
>
> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>
>
>
>
>
> <mx:RemoteObject
>
> id="srvSeguridades"
>
>
>
> destination="seguridades"
>
>
>
> result="event.token.resultHandler(event)"
>
>
>
> fault="event.token.faultHandler(event)"
>
>
>
> endpoint="http://localhost:8080/messagebroker/amf"/>
>
>
>
>
>
> </cairngorm:ServiceLocator>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *2. LINE OF ERROR (RED)*
>
> /
>
>
>
> **
> * @constructor
> * @extends {com.adobe.cairngorm.business.ServiceLocator}
> */
> services.Servicio = function() {
> services.Servicio.base(this, 'constructor');
>
> /**
> * @private
> * @type {mx.rpc.remoting.mxml.RemoteObject}
> */
> this.srvSeguridades_;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldd;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldp;
>
> this.generateMXMLAttributes
> ([1,
> mx.rpc.remoting.mxml.RemoteObject,
> 3,
> 'id',
> true,
> 'srvSeguridades',
> 'destination',
> true,
> 'seguridades',
> 'endpoint',
> true,
> 'http://localhost:8080/messagebroker/amf',
> 0,
> 2,
> 'result',
> this.$EH0,
> 'fault',
> this.$EH1,
> null0, <- ERROR
> 0
> ]);
>
> };
>
>
>
>
>
> 3. Trace console log
>
>
>
> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
> at new services.Servicio (Servicio.js:61)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
> (MXMLDataInterpreter.js:126)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
> (MXMLDataInterpreter.js:271)
> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
> at main.Main.mx.core.Container.createChildren (Container.js:136)
> at main.Main.mx.core.Application.createChildren (Application.js:122)
> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
> at main.Main.mx.core.Container.addedToParent (Container.js:123)
> at
> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
> (UIBase.js:402)
>
>
>
>
> --
>
> Carlos Rovira
>
> http://about.me/carlosrovira
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=2pi7HsEBr5zw9jCg%2Fu4OQvPQs9Ys5TFWbQeIZf1IG88%3D&reserved=0>
>
>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Cairngorm problem add remote object MXML.
Posted by Alex Harui <ah...@adobe.com>.
Carlos, What Flash APIs is Cairngorm dependent on?
-Alex
From: Carlos Rovira <ca...@apache.org>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, February 5, 2020 at 10:05 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Re: Cairngorm problem add remote object MXML.
Hi,
Cairngorm depends on Flash APIs, so make a Royale migration could be not easy, or requires some expertise.
You can use Crux instead that has support for Cairngorm style Commands. Crux is the same as Swiz Framework for Flex but rewritten to work in Royale, and supports much more like dependency injection, Inversion of control, event handling, ...
You have 3 examples in the examples/crux folder you can check.
I recommend you Crux over Cairngorm since Swiz was born to substitute Cairngorm
El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<gu...@gmail.com>>) escribió:
Alex
<version>0.9.7-SNAPSHOT</version>
Thank
El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>>) escribió:
What version of the compiler are you using?
What does the ServiceLocator source look like? It might be an issue with defaultProperties for non-DOM objects.
-Alex
From: De Carli Gustavo <gu...@gmail.com>>
Reply-To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Date: Wednesday, February 5, 2020 at 7:35 AM
To: "users@royale.apache.org<ma...@royale.apache.org>" <us...@royale.apache.org>>
Subject: Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the construction of the ServiceLocator, I understand that it is an error of the MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
1. CODE
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068663207&sdata=JLOGFIXWyvXPtTk3P2zPQLI9K3fVUv61%2B%2FHjYMP2KLE%3D&reserved=0>"
xmlns:mx="library://ns.apache.org/royale/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=TXCVez5kEcJgl2%2FsWRjS8X7HpV%2BnZGITwRJyed2GumI%3D&reserved=0>"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject
id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
2. LINE OF ERROR (RED)
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray (MXMLDataInterpreter.js:126)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances (MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement (UIBase.js:402)
--
Carlos Rovira
http://about.me/carlosrovira<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fabout.me%2Fcarlosrovira&data=02%7C01%7Caharui%40adobe.com%7Cd5763b495d8547e50f7708d7aa65edcc%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165227068673162&sdata=2pi7HsEBr5zw9jCg%2Fu4OQvPQs9Ys5TFWbQeIZf1IG88%3D&reserved=0>
Re: Cairngorm problem add remote object MXML.
Posted by Carlos Rovira <ca...@apache.org>.
Hi,
Cairngorm depends on Flash APIs, so make a Royale migration could be not
easy, or requires some expertise.
You can use Crux instead that has support for Cairngorm style Commands.
Crux is the same as Swiz Framework for Flex but rewritten to work in
Royale, and supports much more like dependency injection, Inversion of
control, event handling, ...
You have 3 examples in the examples/crux folder you can check.
I recommend you Crux over Cairngorm since Swiz was born to substitute
Cairngorm
El mié., 5 feb. 2020 a las 18:24, De Carli Gustavo (<
gustavodecarli@gmail.com>) escribió:
> Alex
>
> <version>0.9.7-SNAPSHOT</version>
>
> Thank
>
> El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>)
> escribió:
>
>> What version of the compiler are you using?
>>
>>
>>
>> What does the ServiceLocator source look like? It might be an issue with
>> defaultProperties for non-DOM objects.
>>
>>
>>
>> -Alex
>>
>>
>>
>> *From: *De Carli Gustavo <gu...@gmail.com>
>> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Date: *Wednesday, February 5, 2020 at 7:35 AM
>> *To: *"users@royale.apache.org" <us...@royale.apache.org>
>> *Subject: *Cairngorm problem add remote object MXML.
>>
>>
>>
>>
>>
>>
>> I am trying to transcribe gairngorm, at runtime it gives me an error in
>> the construction of the ServiceLocator, I understand that it is an error of
>> the MXMLDataInterpreter. Anyone have any idea of the problem.
>>
>> Thank
>>
>> Gustavo.
>>
>>
>>
>> *1. CODE *
>>
>>
>>
>>
>>
>> <?xml version="1.0" encoding="utf-8"?>
>>
>>
>>
>> <cairngorm:ServiceLocator
>>
>> xmlns:fx="http://ns.adobe.com/mxml/2009
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ca2fdd1df7efe4ae1d09608d7aa50fd99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165137141037472&sdata=QWrbWuETHlUgAy9qfGLk%2Bg2gT0WnqFBG2q5mbyWpJDo%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:mx="library://ns.apache.org/royale/mx
>> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ca2fdd1df7efe4ae1d09608d7aa50fd99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165137141047426&sdata=iNbi%2BaaHnZ6ClcNYhQRPBBt%2FkOE6rzdLipLxSOQJZOo%3D&reserved=0>
>> "
>>
>>
>>
>> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>>
>>
>>
>>
>>
>> <mx:RemoteObject
>>
>> id="srvSeguridades"
>>
>>
>>
>> destination="seguridades"
>>
>>
>>
>> result="event.token.resultHandler(event)"
>>
>>
>>
>> fault="event.token.faultHandler(event)"
>>
>>
>>
>> endpoint="http://localhost:8080/messagebroker/amf"/>
>>
>>
>>
>>
>>
>> </cairngorm:ServiceLocator>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>>
>> *2. LINE OF ERROR (RED)*
>>
>> /
>>
>>
>>
>> **
>> * @constructor
>> * @extends {com.adobe.cairngorm.business.ServiceLocator}
>> */
>> services.Servicio = function() {
>> services.Servicio.base(this, 'constructor');
>>
>> /**
>> * @private
>> * @type {mx.rpc.remoting.mxml.RemoteObject}
>> */
>> this.srvSeguridades_;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldd;
>>
>> /**
>> * @private
>> * @type {Array}
>> */
>> this.mxmldp;
>>
>> this.generateMXMLAttributes
>> ([1,
>> mx.rpc.remoting.mxml.RemoteObject,
>> 3,
>> 'id',
>> true,
>> 'srvSeguridades',
>> 'destination',
>> true,
>> 'seguridades',
>> 'endpoint',
>> true,
>> 'http://localhost:8080/messagebroker/amf',
>> 0,
>> 2,
>> 'result',
>> this.$EH0,
>> 'fault',
>> this.$EH1,
>> null0, <- ERROR
>> 0
>> ]);
>>
>> };
>>
>>
>>
>>
>>
>> 3. Trace console log
>>
>>
>>
>> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
>> at new services.Servicio (Servicio.js:61)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
>> (MXMLDataInterpreter.js:126)
>> at
>> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
>> (MXMLDataInterpreter.js:271)
>> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
>> at main.Main.mx.core.Container.createChildren (Container.js:136)
>> at main.Main.mx.core.Application.createChildren (Application.js:122)
>> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
>> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
>> at main.Main.mx.core.Container.addedToParent (Container.js:123)
>> at
>> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
>> (UIBase.js:402)
>>
>
--
Carlos Rovira
http://about.me/carlosrovira
Re: Cairngorm problem add remote object MXML.
Posted by De Carli Gustavo <gu...@gmail.com>.
Alex
<version>0.9.7-SNAPSHOT</version>
Thank
El mié., 5 feb. 2020 a las 14:02, Alex Harui (<ah...@adobe.com>) escribió:
> What version of the compiler are you using?
>
>
>
> What does the ServiceLocator source look like? It might be an issue with
> defaultProperties for non-DOM objects.
>
>
>
> -Alex
>
>
>
> *From: *De Carli Gustavo <gu...@gmail.com>
> *Reply-To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Date: *Wednesday, February 5, 2020 at 7:35 AM
> *To: *"users@royale.apache.org" <us...@royale.apache.org>
> *Subject: *Cairngorm problem add remote object MXML.
>
>
>
>
>
>
> I am trying to transcribe gairngorm, at runtime it gives me an error in
> the construction of the ServiceLocator, I understand that it is an error of
> the MXMLDataInterpreter. Anyone have any idea of the problem.
>
> Thank
>
> Gustavo.
>
>
>
> *1. CODE *
>
>
>
>
>
> <?xml version="1.0" encoding="utf-8"?>
>
>
>
> <cairngorm:ServiceLocator
>
> xmlns:fx="http://ns.adobe.com/mxml/2009
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ca2fdd1df7efe4ae1d09608d7aa50fd99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165137141037472&sdata=QWrbWuETHlUgAy9qfGLk%2Bg2gT0WnqFBG2q5mbyWpJDo%3D&reserved=0>
> "
>
>
>
> xmlns:mx="library://ns.apache.org/royale/mx
> <https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ca2fdd1df7efe4ae1d09608d7aa50fd99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165137141047426&sdata=iNbi%2BaaHnZ6ClcNYhQRPBBt%2FkOE6rzdLipLxSOQJZOo%3D&reserved=0>
> "
>
>
>
> xmlns:cairngorm="com.adobe.cairngorm.business.*">
>
>
>
>
>
> <mx:RemoteObject
>
> id="srvSeguridades"
>
>
>
> destination="seguridades"
>
>
>
> result="event.token.resultHandler(event)"
>
>
>
> fault="event.token.faultHandler(event)"
>
>
>
> endpoint="http://localhost:8080/messagebroker/amf"/>
>
>
>
>
>
> </cairngorm:ServiceLocator>
>
>
>
>
>
>
>
>
>
>
>
>
>
> *2. LINE OF ERROR (RED)*
>
> /
>
>
>
> **
> * @constructor
> * @extends {com.adobe.cairngorm.business.ServiceLocator}
> */
> services.Servicio = function() {
> services.Servicio.base(this, 'constructor');
>
> /**
> * @private
> * @type {mx.rpc.remoting.mxml.RemoteObject}
> */
> this.srvSeguridades_;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldd;
>
> /**
> * @private
> * @type {Array}
> */
> this.mxmldp;
>
> this.generateMXMLAttributes
> ([1,
> mx.rpc.remoting.mxml.RemoteObject,
> 3,
> 'id',
> true,
> 'srvSeguridades',
> 'destination',
> true,
> 'seguridades',
> 'endpoint',
> true,
> 'http://localhost:8080/messagebroker/amf',
> 0,
> 2,
> 'result',
> this.$EH0,
> 'fault',
> this.$EH1,
> null0, <- ERROR
> 0
> ]);
>
> };
>
>
>
>
>
> 3. Trace console log
>
>
>
> Servicio.js:61 Uncaught ReferenceError: null0 is not defined
> at new services.Servicio (Servicio.js:61)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray
> (MXMLDataInterpreter.js:126)
> at
> Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances
> (MXMLDataInterpreter.js:271)
> at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
> at main.Main.mx.core.Container.createChildren (Container.js:136)
> at main.Main.mx.core.Application.createChildren (Application.js:122)
> at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
> at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
> at main.Main.mx.core.Container.addedToParent (Container.js:123)
> at
> Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement
> (UIBase.js:402)
>
Re: Cairngorm problem add remote object MXML.
Posted by Alex Harui <ah...@adobe.com>.
What version of the compiler are you using?
What does the ServiceLocator source look like? It might be an issue with defaultProperties for non-DOM objects.
-Alex
From: De Carli Gustavo <gu...@gmail.com>
Reply-To: "users@royale.apache.org" <us...@royale.apache.org>
Date: Wednesday, February 5, 2020 at 7:35 AM
To: "users@royale.apache.org" <us...@royale.apache.org>
Subject: Cairngorm problem add remote object MXML.
I am trying to transcribe gairngorm, at runtime it gives me an error in the construction of the ServiceLocator, I understand that it is an error of the MXMLDataInterpreter. Anyone have any idea of the problem.
Thank
Gustavo.
1. CODE
<?xml version="1.0" encoding="utf-8"?>
<cairngorm:ServiceLocator
xmlns:fx="http://ns.adobe.com/mxml/2009<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7Ca2fdd1df7efe4ae1d09608d7aa50fd99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165137141037472&sdata=QWrbWuETHlUgAy9qfGLk%2Bg2gT0WnqFBG2q5mbyWpJDo%3D&reserved=0>"
xmlns:mx="library://ns.apache.org/royale/mx<https://nam04.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.apache.org%2Froyale%2Fmx&data=02%7C01%7Caharui%40adobe.com%7Ca2fdd1df7efe4ae1d09608d7aa50fd99%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C637165137141047426&sdata=iNbi%2BaaHnZ6ClcNYhQRPBBt%2FkOE6rzdLipLxSOQJZOo%3D&reserved=0>"
xmlns:cairngorm="com.adobe.cairngorm.business.*">
<mx:RemoteObject
id="srvSeguridades"
destination="seguridades"
result="event.token.resultHandler(event)"
fault="event.token.faultHandler(event)"
endpoint="http://localhost:8080/messagebroker/amf"/>
</cairngorm:ServiceLocator>
2. LINE OF ERROR (RED)
/
**
* @constructor
* @extends {com.adobe.cairngorm.business.ServiceLocator}
*/
services.Servicio = function() {
services.Servicio.base(this, 'constructor');
/**
* @private
* @type {mx.rpc.remoting.mxml.RemoteObject}
*/
this.srvSeguridades_;
/**
* @private
* @type {Array}
*/
this.mxmldd;
/**
* @private
* @type {Array}
*/
this.mxmldp;
this.generateMXMLAttributes
([1,
mx.rpc.remoting.mxml.RemoteObject,
3,
'id',
true,
'srvSeguridades',
'destination',
true,
'seguridades',
'endpoint',
true,
'http://localhost:8080/messagebroker/amf',
0,
2,
'result',
this.$EH0,
'fault',
this.$EH1,
null0, <- ERROR
0
]);
};
3. Trace console log
Servicio.js:61 Uncaught ReferenceError: null0 is not defined
at new services.Servicio (Servicio.js:61)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLArray (MXMLDataInterpreter.js:126)
at Function.org.apache.royale.utils.MXMLDataInterpreter.generateMXMLInstances (MXMLDataInterpreter.js:271)
at main.Main.mx.core.UIComponent.createChildren (UIComponent.js:923)
at main.Main.mx.core.Container.createChildren (Container.js:136)
at main.Main.mx.core.Application.createChildren (Application.js:122)
at main.Main.mx.core.UIComponent.initialize (UIComponent.js:871)
at main.Main.mx.core.UIComponent.addedToParent (UIComponent.js:417)
at main.Main.mx.core.Container.addedToParent (Container.js:123)
at Main_mx_managers_SystemManager.org.apache.royale.core.UIBase.addElement (UIBase.js:402)