what is the equivalent concept in apache royale for flexmdi.swc , flexlib.swc - apache-flex

When I am migrating the flex to royale application , i am unable to implement the concept MDIWindow Concept in royale.
I am able to find in Visual Studio Code IDE the implementation
//Generated from: C:\RemoteObjectAMFTest\external\flexlib.swc
package flexlib.mdi.containers
public class MDIWindow extends mx.containers.Panel
but not able to find at compile time.
could you please help to compile MDIWindow successfully in royale?
col: 9 Warning: Definition flexlib.containers.MDIWindow could not be found.
import flexmdi.containers.MDIWindow; or flexlib.containers.MDIWindow

As far as I know, MDIWindow has not been ported to Royale. Your best bet might be to decide on the features you actually need for your app and implement those parts yourself. Hope this helps.

Related

How to create javaFX jar from a gradle project written in Kotlin

So I've found myself in a rabbit hole...
I recently started learning javaFX and have made some apps here and there, well I've now run into a problem on how do I actually build them into a jar?
I use gradle to setup my projects, and run it through gradles application run
basically this video right here:
https://www.youtube.com/watch?v=nKIMGH0l3Wo
The same guy that made that video also made a video about how to package it (https://www.youtube.com/watch?v=dLH-HjiCtaI). Although this doesn't work because I used kotlin to program my apps, and it uses jlink.
I've looked up a bunch of tutorials and guides, but they all talk about using some sort of packager like jlink.
I found a tutorial that builds an artifact which includes the resource folder, which was the closest I found to working, although the application doesn't run (Error: JavaFX runtime components are missing, and are required to run this application).
So is there a way I can build a jar file? Or did I make a mistake using Kotlin?
Thanks!
Luckily I manager to find some work arounds, you can use gradle and kotlin, but your main class can't inherit from javafx.application.Application. Rather you have your main class call the main function of your main application class, that was a lot of mains, but essentially just this
class Main {
companion object {
#JvmStatic
fun main(args: Array<String>) {
MainApplication().main(args)
}
}
}
(The solution I found)
https://stackoverflow.com/a/52631238/16655016

MvvmCross MvxApplication class overriding for different platforms. (Plus, encryption)

I've got two questions here. The first one is just specific and another one is more general, but is a source of the first one.
So, my specific problem: I want to use Encryption (actually, Hashing) algorithms with using System.Security.Cryptography namespace (for instance, SHA256Managed class).
I found out that (happily) Xamarin has implemented those in System.dll.
But it is not portable and obviously can not be used from Core application directly.
But I've also found another great project -- PclContrib -- which allows you to do that. But, unfortunately, they don't have the implementation for Touch and Android. (However, that still works great for Desktop (Web) and Windows Phone, plus, still can be included into Core (as it uses portable project)).
Anyway, to solve that nicely, I've decided to create some base class for the encryption methods and then override core methods which require the custom dll (for any custom system).
The way I did it (at least, trying to do) was:
Defining virtual method in Core App base class:
public virtual IEncryptionProvider CreateEncryptionProvider()
Overriding Core App class in Touch project with overriding CreateEncryptionProvider (which creates an instance of TouchEncryptionProvider class instance).
Core:
public class App : MvxApplication
Touch:
public class AppTouch : App
Launching it in Touch setup.cs:
protected override Cirrious.MvvmCross.ViewModels.IMvxApplication CreateApp (
{
return new AppTouch();
}
But, that does not work for me. On startup I've got this exception message in log:
"Exception masked KeyNotFoundException: Could not find view for Mynamespace.Etc.LoginViewModel", which works fine when I do new App() instead. I am not sure if that message shows actual problem (as before it was saying the same even that was a problem with some third-party dll, unrelated to views at all). But speaking shortly, that's just a primitive inheritance of App : MvxApplication, but placed not in Core but Touch project.
So, does it requeire some more custom initialization for such situations or do I miss something else?
And, actually, more general question is how should I build such Multiplatform approaches? Actually, now I've got similar problem with HttpUtility.UrlEncode, which I would want to use in my Core project.
What is the MvvmCross "philosophy" to handle such situations?
Thank you.
For the 'viewmodel not found' problem, this is caused because mvvmcross by default only looks for viewmodels in the Assembly containing your app.
If you want it to look in other assemblies, override ViewModelAssemblies in Setup.cs - see how this done in, for example, MvvmCross - structuring shared View Models and Views
For general multplatform approach, please read questions and answers like:
Platform-specific IoC in MVVMCross
Instantiation of ViewModels and Service classes
Please also remember you don't have to use PCLs - if you prefer to use file-linking between multiple platform-specific core projects, then you can of course use this approach.
Finally, please also try to ask one question per question - I find it makes stackoverflow work better for users and with search engines too. If you need to link questions, then you can just add a hyperlink reference - stackoverflow then marks them as related.

org.drools.RuntimeDroolsException: Unable to resolve class

I have this seam project that a colleague built. I am trying to get it to build in Jboss dev Studio. He uses ant and builds manually. I got the project built in JBDS and deployed on the JBoss server. When i try to run the app, when it is time for the rules to fire, I get this error
Caused by: org.drools.RuntimeDroolsException: Unable to resolve class 'dne.nmst.ciscoconfig.model.ConfigParams_$$_javassist_seam_4'
The offending code is in the drools config file which includes 2 imports
package Config;
import dne.nmst.ciscoconfig.model.ConfigParams;
import dne.nmst.ciscoconfig.action.ConfigSelector;
Perhaps I need more detail here, I don't know what would be useful to post. I'm not even sure I know how to ask the question other than how do I fix this. Advice anyone?
Are you 100% sure the jar containing those imports is available at runtime, rather than just at compile time?

In Flex, is it posible to identify if the code is runing on Web or AIR?

I'm coding an app that runs both in the web and on AIR, to avoid copying code arround, I figured I should do 3 kinds of projects on flex builder: Library, Web and AIR projects.
So all my code is on the Library project.
I have accessData.as that extends EventDispatcher to fetch web services and return them as an event. I plan on using this class to also fetch SQLite data for the desktop version, but to do so I need it to decide from wich source to get the data depending on if its Web or AIR.
Anyone know how to do this?
Please refer to this link Detect AIR versus Flash Player from an actionscript library Its more detailed.
You really should have two build targets, one for Web and one for AIR. And your code should be designed in a way that the rest of the system doesnt care what the implementing part is doing, only that it conforms to a certain interface. This way, each build simply replaces the implementing code for each desired platform.
You may find something useful under System or Capabilities in the docs.
Create 2 projects Air and Standalone and create 2 conditional compilation variables for example "standalone" and "air". (more here).
Go to Project->Properties->Flex Compiler and add
For air project:
-define=CONFIG::standalone,false -define=CONFIG::air,true
and for stanalone:
-define=CONFIG::debugging,true -define=CONFIG::air,false
In your code set:
CONFIG::standalone {
trace("this code will be compiled only when air=false and standalone=true");
}
CONFIG::air {
trace("this code will be compiled only when air=true and standalone=false");
}
umm... I just found out a way
var appName:String = Application.application.name;
this works since the web version is called "" and the desktop version is called " desktop"
but if anyone has a better way please go ahead.
thanks.

Provider com.bea.xml.stream.MXParserFactory not found

Anyone come across this error when trying to import a WSDL in Flex builder 3?
Seems it only occurs when trying to import a WCF based service which has 'virtual' endpoints...
Some digging around makes me think Flex has trouble parsing the wsdl (however standard web services work fine).
A bug has been opened for months and still no reply from Adobe:
http://bugs.adobe.com/jira/browse/FB-13542
I am using Flex Builder 3 and the solution found here http://poradowski.com/fb/ that was mentioned in the adobe bug base at FB-13542 worked for me. I just backed up the com.adobe.flexbuilder.axis2_3.0.214193.jar file and put the updated jar file in it's place. Restarted Flex Builder and was able to import our wsdl that had the "policy" tags in it.
This generally happens when you are using the StAX API, and you do not have a StAX implementation in your classpath. See http://forums.java.net/jive/thread.jspa?messageID=117971
I am not too familiar with Flex - but even if you are not using StAX directly, it may be using it under the covers.

Resources