From 8b3b8b1f511c6230d54daab12ae5f068c9595869 Mon Sep 17 00:00:00 2001 From: t-espave Date: Wed, 3 Aug 2011 10:49:21 -0700 Subject: (phone bct) user feedback, showing possibly anomalous nav targets (bct) '+' invalid in string literals --- BCT/BytecodeTranslator/Phone/PhoneNavigationTraverser.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'BCT/BytecodeTranslator/Phone') diff --git a/BCT/BytecodeTranslator/Phone/PhoneNavigationTraverser.cs b/BCT/BytecodeTranslator/Phone/PhoneNavigationTraverser.cs index f94f0044..f32e7f95 100644 --- a/BCT/BytecodeTranslator/Phone/PhoneNavigationTraverser.cs +++ b/BCT/BytecodeTranslator/Phone/PhoneNavigationTraverser.cs @@ -140,11 +140,13 @@ namespace BytecodeTranslator.Phone { string target; if (isNavigationOnBackKeyPressHandler(methodCall, out target)) { PhoneCodeHelper.instance().BackKeyPressNavigates = true; - ICollection targets = PhoneCodeHelper.instance().BackKeyNavigatingOffenders[typeTraversed]; - if (targets == null) { + ICollection targets; + try { + targets= PhoneCodeHelper.instance().BackKeyNavigatingOffenders[typeTraversed]; + } catch (KeyNotFoundException) { targets = new HashSet(); } - targets.Add(target); + targets.Add("\"" + target + "\""); PhoneCodeHelper.instance().BackKeyNavigatingOffenders[typeTraversed]= targets; } else if (isCancelOnBackKeyPressHandler(methodCall)) { PhoneCodeHelper.instance().BackKeyPressHandlerCancels = true; -- cgit v1.2.3