Hi Alex,
Prior to my questions at hte end of this mail, few days ago you
commented about the libraries i use : "you are using certain libraries
like as3corelib and flexlib that have dependencies on Flash. "
From as3corelib.swc i am using the class DateUtils for the method
parseW3CDTF. I found the source code for the swc :
https://github.com/mikechambers/as3corelib/blob/master/src/com/adobe/utils/DateUtil.as
It has copyright.
When i checked the source code i see that it is pure as code if not
missed something.
I searched the royale codebase for any word with W3CDTF bot nothing found.
May be we may find javascript version of the function or use this one ?
30.09.2018 22:02 tarihinde Serkan Taş yazdı:
Hi Alex,
I am not sure I can exactly answer your questions but let me try;
1. Are you using ResourceModules?
I am using ResourceManager only for languge support and changing
user language on runtime. So then i get IResourceManager
e.g.
private static var toolTipList:ArrayList = new ArrayList();
toolTipList.addItem(ResourceManager.getInstance().getString('messages',
'readyTooltip'))
I looked at ResourceManager, ResourceManagerImpl and ResourceBundle
but did not see any "ResourceModules".
But if the subject is Modules class then yes am using the modules
infrastructure for dynamically loading some modules but i do not know
it is related with these three classes "ResourceManager,
ResourceManagerImpl and ResourceBundle"
2. If not, if you comment out all of the support for ResourceModules,
I think you might be able to use the old Flex code mostly as is.You
should be able to comment out the parts that use a Dictionary and
assume that weakReferences aren’t needed. Then the Timer code
shouldn’t be needed either.
İf you mean these, theh ok (ResourceManagerImpl.as)
import flash.events.Event;
import flash.events.EventDispatcher;
import flash.events.FocusEvent;
import flash.events.IEventDispatcher;
import flash.events.TimerEvent;
import flash.system.ApplicationDomain;
import flash.system.Capabilities;
import flash.system.SecurityDomain;
import flash.utils.Dictionary;
// import flash.utils.Timer;
// import mx.core.IFlexModuleFactory;
import mx.core.mx_internal;
import mx.core.Singleton;
import mx.events.FlexEvent;
// import mx.events.ModuleEvent;
import mx.events.ResourceEvent;
import mx.managers.SystemManagerGlobals;
// import mx.modules.IModuleInfo;
// import mx.modules.ModuleManager;
import mx.utils.StringUtil;
3. Use “org.apache.royale.events Event/EventDispatcher” instead of
“flash.events.Event/EventDispatcher”.
Both variable declarations and class extensions, ok !
4. I think you can remove getClassByName from ResourceBundle.
ok, but replace it with "There is
aroyale/org/apache/royale/reflection/getDefinitionByName.as" ?
5. Use ValueEvent instead of FocusEvent.
Used only in (ResourceManagerImpl.as), ok !
6. Also, create something
likeCore/src/main/royale/org/apache/royale/utils/OSUtils.as to get the
locale.
Ok, but may give some advices where to begin ? :)
Thanks,
Serkan...
30.09.2018 05:00 tarihinde Alex Harui yazdı:
Hi Serkan,
Sounds great.
I was just taking a quick look at the code for ResourceManager,
ResourceManagerImpl and ResourceBundle. Are you using
ResourceModules? If not, if you comment out all of the support for
ResourceModules, I think you might be able to use the old Flex code
mostly as is. You should be able to comment out the parts that use
a Dictionary and assume that weakReferences aren’t needed. Then the
Timer code shouldn’t be needed either.
Use “org.apache.royale.events Event/EventDispatcher” instead of
“flash.events.Event/EventDispatcher”.
I think you can remove getClassByName from ResourceBundle.
Use ValueEvent instead of FocusEvent.
Also, create something
likeCore/src/main/royale/org/apache/royale/utils/OSUtils.as to get
the locale.
There is aroyale/org/apache/royale/reflection/getDefinitionByName.as
If you can get the classes to compile cleanly, then we can try seeing
if the Royale compiler will do the right thing with those classes.
HTH,
-Alex
*From: *Serkan Taş <[email protected]>
*Reply-To: *"[email protected]" <[email protected]>
*Date: *Friday, September 28, 2018 at 11:53 PM
*To: *"[email protected]" <[email protected]>
*Subject: *Re: Work on Emulation
Hi Alex,
I am going to work on ResourceManager and mapping of spark to mx.
Have a nice weekend
Thanks.
Serkan
29.09.2018 09:48 tarihinde Alex Harui yazdı:
Hi Serkan,
That looks more like I would expect. I guess you should have an
emulation of resourceManager which will make a lot of those
errors go away. Feel free to try to build it yourself. I also
see that you are using Operation and other parts of RPC. We
should probably emulate that as well.
And I see that you are using some Spark components we haven’t
emulated. For at least now, you might be able to map to existing
MX versions via the manifest in SparkRoyale with the “lookupOnly”
attribute.
I won’t have much more time this weekend.
Later,
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Date: *Friday, September 28, 2018 at 11:15 PM
*To: *"[email protected]" <mailto:[email protected]>
<[email protected]> <mailto:[email protected]>
*Subject: *Re: Work on Emulation
Hi Alex,
After updating the path definitions i got the list of errors :
https://drive.google.com/open?id=16U6awiZCoiunYWgfd_SWHwbppnAImhso
<https://na01.safelinks.protection.outlook.com/?url=https%3A%2F%2Fdrive.google.com%2Fopen%3Fid%3D16U6awiZCoiunYWgfd_SWHwbppnAImhso&data=02%7C01%7Caharui%40adobe.com%7C06c77d454c7543d0a68b08d625d84efd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636738008314441173&sdata=aYqx%2Bc%2B3XV00IqKUCRxW1d1S4D3rN6hByt7kCHPCWHk%3D&reserved=0>
Thanks,
Serkan
29.09.2018 03:48 tarihinde Alex Harui yazdı:
Hi Serkan,
Your -library-path and -js-library-path need a += (not just
“=”) otherwise you reset the list of libraries on the path
instead of appending to it.
HTH,
-Alex
*From: *Serkan Taş <[email protected]>
<mailto:[email protected]>
*Reply-To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Date: *Friday, September 28, 2018 at 2:03 PM
*To: *"[email protected]"
<mailto:[email protected]> <[email protected]>
<mailto:[email protected]>
*Subject: *Re: Work on Emulation
Hi Alex,
I replaced the namespaces to
xmlns:mx="library://ns.apache.org/royale/mx"
xmlns:s="library://ns.apache.org/royale/spark"
compiled with options :
Using Royale Compiler codebase:
/home/pinara18/royale/apache-royale-0.9.4-bin-js-swf/royale-asjs/js/bin/../..
Using Royale SDK:
/home/pinara18/royale/apache-royale-0.9.4-bin-js-swf/royale-asjs/js/bin/../..
MXMLJSC
+royalelib=/home/pinara18/royale/apache-royale-0.9.4-bin-js-swf/royale-asjs/js/bin/../../frameworks
-sdk-js-lib=/home/pinara18/royale/apache-royale-0.9.4-bin-js-swf/royale-asjs/js/bin/../../frameworks/js/Royale/generated-sources
/home/pinara18/royale/pinaragroup/PinaraUI/src/com/likya/pinara/main/PinaraUI.mxml
-library-path=/home/pinara18/royale/pinaragroup/PinaraUI/libs
-js-library-path=/home/pinara18/royale/pinaragroup/PinaraUI/libs
-source-path=/home/pinara18/royale/pinaragroup/PinaraUI/src,/home/pinara18/royale/pinaragroup/PinaraUI/locale/{locale}
-services=/home/pinara18/royale/pinaragroup/Pinara-0.0.1/WEB-INF/flex/services-config.xml
-locale
en_US
tr_TR
-o
.PinaraUI.swf
and the result is :
Loading configuration:
/home/pinara18/royale/apache-royale-0.9.4-bin-js-swf/royale-asjs/frameworks/royale-config.xml
/home/pinara18/royale/pinaragroup/PinaraUI/src/com/likya/pinara/main/PinaraUI.mxml(2):
col: 1 Error: This tag could not be resolved to an
ActionScript class. It will be ignored.
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C06c77d454c7543d0a68b08d625d84efd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636738008314441173&sdata=LNFCKV5tqcneII%2FXbHFj1%2FsJ6iscC6RzFikboGXYXgc%3D&reserved=0>
^
/home/pinara18/royale/pinaragroup/PinaraUI/src/com/likya/pinara/main/PinaraUI.mxml(2):
col: 1 Error: This tag could not be resolved to an
ActionScript class. It will be ignored.
<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
<https://na01.safelinks.protection.outlook.com/?url=http%3A%2F%2Fns.adobe.com%2Fmxml%2F2009&data=02%7C01%7Caharui%40adobe.com%7C06c77d454c7543d0a68b08d625d84efd%7Cfa7b1b5a7b34438794aed2c178decee1%7C0%7C0%7C636738008314441173&sdata=LNFCKV5tqcneII%2FXbHFj1%2FsJ6iscC6RzFikboGXYXgc%3D&reserved=0>
^
3.778434625 seconds
I tried changing the application to <mx:Application> and
<js:Application> got the similar errors.
27.09.2018 22:49 tarihinde Serkan Taş yazdı:
Ok, I'll check it and replace.