Here’s the strategy that we used. It worked very well. 1. We created intermediary “dummy” classes which were named the same as the Flex and Flash classes we used. 2. The dummy classes were based off the lightest-weight Royale classes that were usable. Start with UIBase and adjust as needed. 3. Go through your app and change the class paths from flash and flex to the Royale and “dummy” equivalents. 4. You will get lots of compile errors about missing properties and methods. 5. Use an IDE to make it easier to add stubs for the missing properties and methods to your dummy classes. 6. Continue this process until you have no compiler errors. 7. You will now have documentation of exactly which features you used in Flash and Flex classes. 8. Go through your dummy classes and either find the features in Royale which accomplish what you need or implement them as needed. 9. Remove the dummy classes as they are no longer needed.
We had very good separation between model and view. We first disconnected the view and went through this process in the model. Once we were done with the model, we reconnected the view and repeated the process there. ArrayList is a pretty good replacement for ArrayCollection. We also needed sort, but I ended up just writing a sort function to sort the array directly. We needed to change a bit of the code because we were using refresh() on ArrayCollection, but the changes were pretty minor. Mouse Events should mostly come along for free, but depending on what you are doing, the native moue events might or might not be good enough. We ended up using SVG components extensively and we had to write our own MouseManager class (due to browser bugs) to calculate all mouse events using matrix math. HTH, Harbs > On Nov 14, 2017, at 6:29 AM, Carlos Cruz <[email protected]> wrote: > > Hi, > I have a few hundred custom components (i.e. a city selector) to convert > from Flex to Royale I was wondering if I could get some input or > confirmation my approach will be OK. > > All the components I want to convert are made up of a custom base component > using the Flex UIComponent Class that holds the properties and an > ArrayCollection to hold special properties and 1 Flex image component. > > Is the ViewBase class the base class to create visual components in Royale (I > realize I will have to add functionality like mouse events)? > Then I’m thinking of using the ArrayList to replace the ArrayCollection > component (I do need sort and filters) > > I’m I on the right track? > > Thanks! > Carlos >
