Defensive code for AA data types
dblume

dblume commited on 2023-01-25 23:58:34
Showing 2 changed files, with 9 additions and 1 deletions.

... ...
@@ -39,7 +39,11 @@ function executeTest() as void
39 39
     m.top.updateText = "roDeviceInfo.GetDisplayProperties"
40 40
     for each key in aaConnectionInfo.Keys()
41 41
         val = aaConnectionInfo[key]
42
+        if type(aaConnectionInfo[key]) <> "roByteArray"
42 43
             m.top.updateText = "  " + key + " = " + val.ToStr()
44
+        else
45
+            m.top.updateText = "  " + key + " = a byte array"
46
+        endif
43 47
     end for
44 48
 
45 49
     deviceInfo = CreateObject("roDeviceInfo")
... ...
@@ -47,7 +51,11 @@ function executeTest() as void
47 51
     m.top.updateText = "roDeviceInfo.GetConnectionInfo"
48 52
     for each key in aaConnectionInfo.Keys()
49 53
         val = aaConnectionInfo[key]
54
+        if type(aaConnectionInfo[key]) <> "roByteArray"
50 55
             m.top.updateText = "  " + key + " = " + val.ToStr()
56
+        else
57
+            m.top.updateText = "  " + key + " = a byte array"
58
+        endif
51 59
     end for
52 60
 
53 61
     request = GetRequest()
... ...
@@ -1,7 +1,7 @@
1 1
 title=dxb
2 2
 major_version=0
3 3
 minor_version=4
4
-build_version=0
4
+build_version=1
5 5
 ui_resolutions=fhd
6 6
 mm_icon_focus_hd=pkg:/images/mm_icon_focus_hd.png
7 7
 mm_icon_focus_sd=pkg:/images/mm_icon_focus_sd.png
8 8