powered by Jive Software

Problem with MTASC

When I am using MTASC to compile my program, I can not receiving event from the XMPPConnection. Is there anyone know why?

taowen,

There are some subtle differences in the MTASC and Macromedia Flash compilers It would be difficult to determine what is causing the error. My assumption is some of the code in the XIFF classes are not 100% ActionScript 2 compliant, or just how the code is structured in a way that MTASC can’‘t recognize. Unfortunately, we would be unable to help pin point the problem at this time as we are trying to get a stable XIFF 2 Release out a soon as possible. Sorry I can’'t be more of a help on this.

thank you for your quick reply.

I added some trace in XMPPConnection, and noticed that the XMLSocket event can not be received by XMPPConnection, either. So, I wander if this problem came from mtasc can not compile XMLSocket program proberly, but I am not very sure. I copyed the test code to flash ide, and compiled it by mcc, then everythings is ok, how strange. Or, the security policy file can be a possible cause?

and I am very interested in the development of xiff, can you introduce how your guys work together? is there any possibility to join your team, maybe fixing this problem can be a start point

I finally worked out why…

I first use new XMLSocket in my as file, it can not connect

then I create a XMLSocket in my fla file, and pass it to my as class, it also can not connect

then I use a var to store the created XMLSocket, and then pass it to my as class, then it works…

another problem is onConnect(onxxxx functions), I can not hook up my handler in my as class, I can only do this in my fla file, then invoke my handler from the fla…

Now, I am sure it is a problem caused by XMLSocket. But I am still wander why and will be quite happy anyone tell me how this odd behavour can happen. I guess it may be caused by the lifecycle of the variable.

taowen - we are very open to the community helping out on XIFF. The more testing we can do during the Beta period the better off XIFF will be. At this point, keep using the forums to report issues / bugs / and even fixes and we will get them rolled in. Thanks!

I tried sometimes more and finally found this problem has nothing to do with xiff.

if you use -main param in MTASC, then you can not hook up event handler…

and if you new XMLSocket in youre as class, then you can not connect…

thank you for your reply, and I will keep using xiff, and report bugs I found.

you can consider using MTASC to check your code in the future, as it check syntax more strict, and using it to compile may speed up your development.

Hi all,

I’‘ve the same probleme with mtask, I’'ve done a new XMLSocket and compiled with -main option and never received callback function like onconnect, onData…

Please can you explain what is the solution

Regards,

Jean-Pierre

Hi Jean-Pierre,

It seems like it is a bug with the MTASC compiler and Nicolas still needs to fix it. You can see from this thread: http://lists.motion-twin.com/archives/mtasc/2005-April/001508.html that he is waiting for someone to send him a simple example reproducing the bug.

-Chris

if you don’'t use -main parameter and call the static constructor manually, then the problem is fixed. but I encountered a new problem, that is I can not see Extension(a xiff concept) works properly.