A Amalgamated Sugar Member Licensed User Apr 26, 2018 #1 I'm refactoring some code from another co-worker's project and came across this in the comments: Code: Copy 'Again we are not initializing the map. Dim Setupinfo As Map Setupinfo = File.ReadMap(File.DirRootExternal, "Setup.txt") Unfortunately, said co-worker no longer works here. So, I can't ask him. Can a map collection be initialized from File.ReadMap? And if it can, is it considered best practice? I know that it can be done with CreateMap... Last edited: Apr 26, 2018
I'm refactoring some code from another co-worker's project and came across this in the comments: Code: Copy 'Again we are not initializing the map. Dim Setupinfo As Map Setupinfo = File.ReadMap(File.DirRootExternal, "Setup.txt") Unfortunately, said co-worker no longer works here. So, I can't ask him. Can a map collection be initialized from File.ReadMap? And if it can, is it considered best practice? I know that it can be done with CreateMap...
Yvon Steinthal Active Member Licensed User Longtime User Apr 26, 2018 #2 It all depends on the use and the privacy of your map. Yes it works, is it best practice? It depends on what you do with it or more what the map holds as information. File.DirRootExternal makes it editable by anyone holding the android device. Makes sure you have the right syntax with that "Setup.txt" file. Have you tested it? Upvote 0
It all depends on the use and the privacy of your map. Yes it works, is it best practice? It depends on what you do with it or more what the map holds as information. File.DirRootExternal makes it editable by anyone holding the android device. Makes sure you have the right syntax with that "Setup.txt" file. Have you tested it?
A Amalgamated Sugar Member Licensed User Apr 26, 2018 #3 Nevermind. After swimming through the code a little longer, 'Setupinfo' is a Process Global that gets initialized during Activity Create from a separate code module.... Sometimes, reading another person's code can be a challenge... Upvote 0
Nevermind. After swimming through the code a little longer, 'Setupinfo' is a Process Global that gets initialized during Activity Create from a separate code module.... Sometimes, reading another person's code can be a challenge...
Yvon Steinthal Active Member Licensed User Longtime User Apr 26, 2018 #4 If its sensitive setup information, i suggest moving it away from DirRootExternal if possible... Just a thought... Upvote 0
If its sensitive setup information, i suggest moving it away from DirRootExternal if possible... Just a thought...
A Amalgamated Sugar Member Licensed User Apr 26, 2018 #5 I've addressed the possibility of moving the file with my applications manager and business analyst. Both have come back with the information not being sensitive. It sure would be easier to not have to request runtime permissions though... Upvote 0
I've addressed the possibility of moving the file with my applications manager and business analyst. Both have come back with the information not being sensitive. It sure would be easier to not have to request runtime permissions though...
Yvon Steinthal Active Member Licensed User Longtime User Apr 26, 2018 #6 In that case remember that it can be edited by the user, therefore making an error in the "File.ReadMap" function possible. I suggest maybe surrounding your ReadMap in a Try Catch in order to "Catch" any file alteration. Upvote 0
In that case remember that it can be edited by the user, therefore making an error in the "File.ReadMap" function possible. I suggest maybe surrounding your ReadMap in a Try Catch in order to "Catch" any file alteration.