Convert js project to NME project? - haxe

I have a project written in createJS using haxe js project, what would it involve to re-write the project to be NME based targeting AS3?
Is it a difficult task? any one tried this before?

Okey, after one months, no answers! so, I decided to answer my question, as I have already started porting my createJS project to haxe nme, here is what I got:
haxe nme is now openFL
targeting flash with openFL is very easy! they are using the same Flash APIs
using FlashDevelop, you will need to use conditional compilation
to keep things simple, rather than re-writing onPress, onMouseMove .. etc in createJS, I've created a wraper classes that use the same APIs of createJS, which will add events/ remove events behind the scenes
also, I wrote a wrapper for Tween to use Actuate behind the scenes.
Any one needs those wrappers, I would be glad to help!

Related

Errors when running Language-Solution in MPS

I'm developing an DSL with jetbrains MPS. It's not obvious to use, but I succeeded so far with the design-part.
It's possible to right-click on a solutions node and "run" it, assuming the language is executable (extends executing.util). Plus I use a seperately developed jar as a library (used by the generator).
I build a new project to test, as simple as possible, added some extra nodes and loops in the generator, the error occures and it can't be undone.
As far as I can see, there are several possible sources of errors.
dependencies (they are tricky in MPS)
my jar
wrong cached files or so
Executing "run" causes the following error:
error: could not find or load main class MySolution.package.map_concept
Has some of you out there experience with this?
Tell me, if there are some extra information that would help.
It seems that you have added the jar file as a model to the language, which makes it invisible for the solution. Following the instructions at https://confluence.jetbrains.com/display/MPSD32/Getting+the+dependencies+right#Gettingthedependenciesright-AddingexternalJavaclassesandjarstoaprojectruntimesolutions and creating a separate library solution worked for me.
To me this looks like a problem of the generator. Have you fully rebuilt the project - right-click on the "project" node in the structure tree?
Is the root mapping template correct? If you can share your project, I can have a look.
A small tip that could have saved me some time and might also solve this problem for someone else, even if you followed the instructions in other answers.
When prompted to add your libraries to modules after including the libraries on Java tab, dismiss the window if you already included them in the first place on the Common tab. Otherwise they are listed once despite having been added twice, leading to a compilation failure.

SpeechKit/SpeechKit In Extension App like Custom Keyboard

I have tried any posible way of importing this framework in my custom extension keyboard, but I have failed all the trials that I think is possible.
1st.
I have tried it in full swift code, importing that framwork using bridging header. But, Most of its command isn't compatible with swift, got an error in enumeration -> NSUInteger in ObjC -> swift always complains, can't even use convert type.
2nd
I have also tried full Objective-C coding. Implementing its function was easy task. But Fails to use this framework. Can't import it in extension App. I have also use bridging header but got an error. "File not found" even though if you do command click, you'll be jumped to its framework. (means indexing is success. and xcode find it clear.). In the end, I think this framework doesn't work with extension, so far.
so, Any idea of how to implement this correctly? advice will be appreciated. Thanks in advance :)

Simple mvvmcross monotouch with xib support (and monomac)

I tried the simpledroid with INotifyPropertyChanged and ICommand successfully.
I want to do the same with monotouch and xib designer,but without TouchDialog. Is there a way to implement without inheriting from mvx class as in monodroid?
Is it possible to do the same with MonoMac without Dialog as Portable Library in MonoMac or XaMac in supported now?
I understand what is your goal.
I think you want to start learning MvvmCross for Monotouch with a basic application example as you probably did with SimpleDroid. I tried to do the same without success.
Why ? Because SimpleDialogTouch is an "Advanced" example in my opinion. When you learn Monotouch, you use xib to design your view. But the sample tells you to learn a new tool "Monotouch Dialog" which is a way to display controls programmatically.
You get those errors because the sample implements the ViewModel only for Dialog and not for xib or classic binding.
Finally, you will have to dig into MvvmCross to build your own SimpleTouch implementation. The problem is that you don't have a lot of documentation, but Stuart is the best supporter for a beginner or you can switch to advanced Mvx features if you don't need to understand the underground of MvvmCross. There are a lot of samples, tutorials and posts to tweak Mvx.
Hope that helps.
Is there a way to implement without inheriting from mvx class as in monodroid?
I don't believe this is supported in the current source.
There is an effort underway to separate out the databinding code in MvvmCross so it can be used more easily with other frameworks - e.g. we might try porting MvvmLight across too. This is where my effort is currently focused.
If you need this now, then I think you could fairly easily create this simple binding yourself if you wanted to - but you'd have to take a look at what the SimpleDialog version does - it's not too big a code to copy across to the XIB version - https://github.com/slodge/MvvmCross/blob/vnext/Cirrious/Cirrious.MvvmCross.Dialog.Touch/Simple/MvxSimpleTouchDialogViewController.cs
But... why not just implement a proper portable MvxViewModel instead?
Is it possible to do the same with MonoMac without Dialog as Portable Library in MonoMac or XaMac in supported now?
Portable libraries are not supported in any release from Xamarin yet - there is an unofficial installer that Jeff very kindly provided - but it's not a release...
For MvvmCross MonoMac/XaMac support, there is one non-PCL version from #deapsquatter around, but I don't believe this has data-binding yet.
I will be working on a PCL and data-binding release for MonoMac or XaMac - but it's on a spare time basis - no-one's come forward with a customer project to fund that work yet. If you or anyone wants to assist with this port, then you are very welcome... but it will be quite technical work - there are changes I intend to make 'under the covers' - so the easiest place for others to help will probably be in later work - adding more views, more bindings, doing QA, making samples, etc.
Note: "Simple" bindings are not the future for MvvmCross and may get dropped from a future release. However, this will only happen after I've separated out the Binding code so that it can be used with other libraries - the first of which will probably be a simple binding example.
I personally don't see much difference or advantage in using these so-called Simple bindings... but maybe I'm missing something...

C# Accessing classes in a WinForms project from a classes in a Class Library

I have two c# projects within a solution.
The first project is a winforms project with several classes and is called QuantumGUI. The second project is a class library project with several classes and is called QuantumDAL.
My objective is from a class in QuantumDAL to access and set variables in a QuantumGUI class or and in Form.cs.
I have tried adding a reference to QuantumGUI in my QuantumDAL project but received the following error: “A Reference to ‘QuantumGUI’ could not be added. Adding the project as a reference would cause a circular dependency”.
I received a similar error message trying to add Project Dependencies. When you think about it, the error message makes sense.
I’ve tried other, what I consider possible ways of doing this but came up empty. I believe there must be a clever way of getting this done.
If I’m going about this in a wrong way, is there a way to have a “global” class that can be accessed by code in both projects?
Thank you for taking the time to look at this.
There are two problems with what you're trying to do:
First, as the IDE is warning you, you're about to create a circular dependency. This means that the compiler would need to build project A before it can build project B, but it would need to build project B before it can build project A. Neither project can go "first".
The second problem is that your WinForms project is most likely an executable, and you cannot add references to *.exe files via the IDE. You can add those references via the command-line, but the fact that Visual Studio is trying to stop you from doing it should be a red flag that it's a really bad idea.
The correct way to do what you want is to refactor the common classes into a third class library that you reference from both other projects. If needed, you can wire up events (in particular, look at the INotifyPropertyChanged interface and its event) that notify interested observer objects when things change.

COM basic sample

I've been reading Essential COM, it is a very good book, very instructive and simple to understand. Now I want to speed things up and implement a simple COM object, compile it into a .dll and finally use it from a client application.
I would really appreciate if anybody could show the most basic sample of how to do that?
I've been trying with this step by step but, besides founding some errors, I could not make it work. The reason for this is that I've created a simple Win32 application, I started coding the COM from scratch (as the step by step shows) and fails to compile/link (lot of errors), I must be forgetting some configuration or some includes in stdafx.h or whatever.
I'm working in Visual C++ with Microsoft Visual Studio .Net 2003
Thanks in advance!
One of the most friction-free ways is to use one of the wizard-generated solutions, and in particular the "ATL Project" wizard in VS 2008 (not sure about 2003). You just select "DLL" when asked the server type you want, and you're left with a very usable COM DLL skeleton where to fill in your code.
Tip: to add a new COM interface and coclass, the easiest way is to go to Class View, right-click on the project, and select Add->Class..., then select "ATL Simple Object" and answer the wizard questions.
EDIT: to answer Toto's additional question in the comments (how to create a client to use the freshly-created COM DLL), the answer is "it depends on the language", as you have an enormous choice here. You can use VB ("add reference"), C#/VB.NET ("add reference", COM tab), VBScript (WScript.CreateObject), and of course C++ too. In a nutshell, from a C++ client you need to include the server's IDL and link to the server's LIB file.

Resources