Error haxe.remoting.HttpAsyncConnection should be ...

60 views
Skip to first unread message

Marco Afonso

unread,
Jul 25, 2013, 7:27:52 PM7/25/13
to haxe...@googlegroups.com

Hi all,

I'm new to Haxe. I'm using Haxe 3.0.

I was following the remoting tutorial and I have 2 classes in file Client:

class Client {
    ...
}

class MyModuleView {
    ...
}

I create the HttpAsyncConnection in the Client and make the call in the MyModuleView. This way works fine without errors.

However, if I just move the class ModuleView to outside, to another file, (and I import MyModuleView into Client) I get this strange error at compile time.
haxe.remoting.HttpAsyncConnection should be { MyModuleView : { save : { call : Array<String> -> (response : Map<String, String> -> Void) -> Unknown<0> } } }

I'm targeting php for the server and js for the client.

Help please! :)

Ali Jaya Meilio Lie

unread,
Jul 25, 2013, 10:02:45 PM7/25/13
to The haXe compiler list
I'm not sure, but if you can provide which line that causing the error I think that is more informative for us to solve your problem.

Regards,
Ali Jaya Meilio




--
To post to this group haxe...@googlegroups.com
http://groups.google.com/group/haxelang?hl=en
---
You received this message because you are subscribed to the Google Groups "Haxe" group.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Marco Afonso

unread,
Jul 26, 2013, 5:12:10 AM7/26/13
to haxe...@googlegroups.com

Thank you alijaya.

I did a simpler version from the online code and it's ok moving the second class to outside...

Anyway, the compile time error complains about the type, but I have it working when the class MyExampleView is on the same file... strange.

I do not have the original code now, but I think the error complains about this line:
var cnx = haxe.remoting.HttpAsyncConnection.urlConnect(URL);

Thanks!

Marco Afonso

unread,
Jul 27, 2013, 6:09:02 AM7/27/13
to haxe...@googlegroups.com

Hi,

It is solved. In my code, the HttpAsyncConnect is a Client static var and I forgot to declare the type in the class.

Thanks anyway :)


Sexta-feira, 26 de Julho de 2013 0:27:52 UTC+1, Marco Afonso escreveu:
Reply all
Reply to author
Forward
0 new messages