Skip to content

Commit

Permalink
using trace instead of alert by default
Browse files Browse the repository at this point in the history
Change-Id: I068c3bc5af55a4b092f4e02649e478f7a9be1639
  • Loading branch information
adufilie committed Oct 12, 2012
1 parent 0337aef commit 64f7cee
Showing 1 changed file with 20 additions and 10 deletions.
30 changes: 20 additions & 10 deletions WeaveMobileClient/src/WeaveMobileClient.mxml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,7 @@
public var main:WeavePodLayoutManager;
public var console:MobileConsole;
public var tileLayout:TileLayout;
public var alert:Boolean = false;
private function init(event:Event):void
{
Expand Down Expand Up @@ -105,7 +106,11 @@
if (errors.length)
{
var error:Error = errors[errors.length - 1] as Error;
SparkAlert.show(ErrorManager.errorToString(error), 'Error ('+errors.length+')');
var str:String = ErrorManager.errorToString(error);
if (alert)
SparkAlert.show(str, 'Error ('+errors.length+')');
else
weaveTrace(str);
}
}
Expand Down Expand Up @@ -150,16 +155,21 @@
return;
weaveTrace('Received: ' + configURL);
Weave.loadWeaveFileContent(event.result as ByteArray);
// temporary hack to make sure gestures are enabled
Weave.properties.toolInteractions.pan.value = WeaveAPI.CSVParser.createCSV([[InteractionController.ALT, InteractionController.INPUT_DRAG], [InteractionController.INPUT_PAN]]);
Weave.properties.toolInteractions.zoom.value = WeaveAPI.CSVParser.createCSV([[InteractionController.SHIFT, InteractionController.INPUT_DRAG], [InteractionController.INPUT_WHEEL], [InteractionController.INPUT_ZOOM]]);
try
{
Weave.loadWeaveFileContent(event.result as ByteArray);
weaveTrace(ObjectUtil.toString(WeaveAPI.globalHashMap.getNames()));
console.visible = false;
// temporary hack to make sure gestures are enabled
Weave.properties.toolInteractions.pan.value = WeaveAPI.CSVParser.createCSV([[InteractionController.ALT, InteractionController.INPUT_DRAG], [InteractionController.INPUT_PAN]]);
Weave.properties.toolInteractions.zoom.value = WeaveAPI.CSVParser.createCSV([[InteractionController.SHIFT, InteractionController.INPUT_DRAG], [InteractionController.INPUT_WHEEL], [InteractionController.INPUT_ZOOM]]);
weaveTrace(ObjectUtil.toString(WeaveAPI.globalHashMap.getNames()));
console.visible = false;
}
catch (e:Error)
{
reportError(e);
}
}
private function handleConfigFileFault(event:FaultEvent, configURL:String = null):void
{
Expand Down

0 comments on commit 64f7cee

Please sign in to comment.