It's me again Sean T...noticed the new forums...I guess you won't be importing all the old posts from the old system to here? (I imagine there must be a lot of useful information over there :)
Anyhoo...So the multiplayer coding war still continues for me and recently I have decided to make my "networking management" more organized since the Reactor API allows you to specify custom client and room classes - nice! So I spent about a month overhauling my code (blindly without testing) and I continue to learn soooo much about Union along the way. I've hit a bit of a road block that is out of my control, seems to be an oversight on your end but shouldn't be too hard to fix (hopefully) and you can let me know if it is already taken care of in Reactor 1.1.
So the issue has to do with me extending CustomClient for my own client class. Somewhere in the process where MessageListeners are being notified, the reactor code-base is referencing my CustomClient object attempting to cast it to a net.user1.reactor.Client. I guess this is an error because CustomClient does not extend Client. So I'm thinking that if you change in your code to cast to Reactor's IClient instead, we should be okay? Here is the stack trace:
- Code: Select all
TypeError: Error #1034: Type Coercion failed: cannot convert client.common.serverInterfaces.reactor::JamDomClient@a1f22c1 to net.user1.reactor.Client.
at CoreMessageListener/u103()[/Users/colin/build/working/src/net/user1/reactor/CoreMessageListener.as:1226]
at Function/http://adobe.com/AS3/2006/builtin::apply()
at net.user1.reactor::MessageManager/notifyMessageListeners()[/Users/colin/build/working/src/net/user1/reactor/MessageManager.as:718]
at net.user1.reactor::MessageManager/upcReceivedListener()[/Users/colin/build/working/src/net/user1/reactor/MessageManager.as:291]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at net.user1.reactor::XMLSocketConnection/dataListener()[/Users/colin/build/working/src/net/user1/reactor/XMLSocketConnection.as:219]
at flash.events::EventDispatcher/dispatchEventFunction()
at flash.events::EventDispatcher/dispatchEvent()
at flash.net::XMLSocket/scanAndSendEvent()
Hopefully by casting to IClient, it is enough for that framework code to function properly??? It seems as though once I set the custom class that Reactor now permanently uses that class for it's internal functions. As you can see in the stack trace above, none of my code is referenced so it seems to be out of my control apart from reverting back to Reactor's default Client class. u103 seems to be Union's ClientRemoved message so it looks like I'll get this failed type conversion every time the ClientManager gets this update.
Please advise as soon as you can as my Union programming is now on hold. :(
Thanks in advance!