Index: lams_common/src/flash/org/lamsfoundation/lams/common/comms/Communication.as =================================================================== diff -u -r8cc1a3d443c1117c3c974a1b6021c58a9f3be812 -r71f7f86fa0f3c8b4cd5a2f7b6ae857f1b4481bd3 --- lams_common/src/flash/org/lamsfoundation/lams/common/comms/Communication.as (.../Communication.as) (revision 8cc1a3d443c1117c3c974a1b6021c58a9f3be812) +++ lams_common/src/flash/org/lamsfoundation/lams/common/comms/Communication.as (.../Communication.as) (revision 71f7f86fa0f3c8b4cd5a2f7b6ae857f1b4481bd3) @@ -37,7 +37,7 @@ /** * Comms constructor */ - function Communication(serverURL:String){ + function Communication(aServerURL:String){ trace('Communication.constructor'); //Set up queue @@ -49,10 +49,12 @@ //_global.breakpoint(); if(_serverURL == null){ //_serverURL = Config.getInstance().serverUrl; - if(_root.serverURL==null){ - Debugger.log("! serverURL is not set, unable to connect to server !!",Debugger.CRITICAL,'Consturcutor','Communication'); - }else{ + if(_root.serverURL!=null){ _serverURL = _root.serverURL; + }else if(aServerURL != null){ + _serverURL = aServerURL; + }else{ + Debugger.log("! serverURL is not set, unable to connect to server !!",Debugger.CRITICAL,'Consturcutor','Communication'); } } @@ -177,8 +179,10 @@ //user friendly error var e = new LFError(responseObj.messageValue,"onServerResponse",this); dispatchToHandlerByID(queueID,e); - //showAlert("Oops", responseObj.body, "sad"); + //TODO: Make sure that things that have requested server responses can handle an error object + //showAlert("Oops", responseObj.body, "sad"); }else if(responseObj.messageType == SYSTEM_ERROR_CODE){ + LFMessage.showMessageAlert(responseObj.messageValue, null, null); //showAlert("System error", "
Sorry there has been a system error, please try the operation again. If the problem persistes please contact support
Additional information:"+responseObj.body+"
", "sad"); }else{ //Everything is fine so lookup callback handler on queue