summaryrefslogtreecommitdiff
path: root/BCT
diff options
context:
space:
mode:
authorGravatar t-espave <unknown>2011-08-03 10:49:21 -0700
committerGravatar t-espave <unknown>2011-08-03 10:49:21 -0700
commit8b3b8b1f511c6230d54daab12ae5f068c9595869 (patch)
tree71fa33cb3c25587738df05c817862c31224ff80e /BCT
parentf29c3a7e467c273fe9c4900eb971e6148edcc1d7 (diff)
(phone bct) user feedback, showing possibly anomalous nav targets
(bct) '+' invalid in string literals
Diffstat (limited to 'BCT')
-rw-r--r--BCT/BytecodeTranslator/Phone/PhoneNavigationTraverser.cs8
-rw-r--r--BCT/BytecodeTranslator/TranslationHelper.cs1
2 files changed, 6 insertions, 3 deletions
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<string> targets = PhoneCodeHelper.instance().BackKeyNavigatingOffenders[typeTraversed];
- if (targets == null) {
+ ICollection<string> targets;
+ try {
+ targets= PhoneCodeHelper.instance().BackKeyNavigatingOffenders[typeTraversed];
+ } catch (KeyNotFoundException) {
targets = new HashSet<string>();
}
- targets.Add(target);
+ targets.Add("\"" + target + "\"");
PhoneCodeHelper.instance().BackKeyNavigatingOffenders[typeTraversed]= targets;
} else if (isCancelOnBackKeyPressHandler(methodCall)) {
PhoneCodeHelper.instance().BackKeyPressHandlerCancels = true;
diff --git a/BCT/BytecodeTranslator/TranslationHelper.cs b/BCT/BytecodeTranslator/TranslationHelper.cs
index ad264c48..e91af9c2 100644
--- a/BCT/BytecodeTranslator/TranslationHelper.cs
+++ b/BCT/BytecodeTranslator/TranslationHelper.cs
@@ -153,6 +153,7 @@ namespace BytecodeTranslator {
s = s.Replace('[', '$');
s = s.Replace(']', '$');
s = s.Replace('|', '$');
+ s = s.Replace('+', '$');
s = GetRidOfSurrogateCharacters(s);
return s;
}