S Scantech Well-Known Member Licensed User Longtime User Dec 7, 2011 #1 Check the code below and wondering why Msgbox will not display. I have nothing in that key. or the key never been created. Test.ini does not contain the Key "Test". On the Debug screen Data shows the value Null. What am I doing wrong here? Code: Copy Dim Map1 As Map Map1 = File.ReadMap(File.DirRootExternal, "Test.ini") Dim Data As String Data = map1.Get("Test") If Data = Null Then Msgbox("Yes","") End If
Check the code below and wondering why Msgbox will not display. I have nothing in that key. or the key never been created. Test.ini does not contain the Key "Test". On the Debug screen Data shows the value Null. What am I doing wrong here? Code: Copy Dim Map1 As Map Map1 = File.ReadMap(File.DirRootExternal, "Test.ini") Dim Data As String Data = map1.Get("Test") If Data = Null Then Msgbox("Yes","") End If
stevel05 Expert Licensed User Longtime User Dec 7, 2011 #2 You're probably better off using GetDefault where you can specify a return value if the entry doesn't exist. Data = map1.GetDefault("Test","Not Found") then you can test for that. If Data = "Not Found" ... Upvote 0
You're probably better off using GetDefault where you can specify a return value if the entry doesn't exist. Data = map1.GetDefault("Test","Not Found") then you can test for that. If Data = "Not Found" ...
S Scantech Well-Known Member Licensed User Longtime User Dec 8, 2011 #3 stevel05 said: You're probably better off using GetDefault where you can specify a return value if the entry doesn't exist. Data = map1.GetDefault("Test","Not Found") then you can test for that. If Data = "Not Found" ... Click to expand... I'll give it a shot. Thanks Steve. Upvote 0
stevel05 said: You're probably better off using GetDefault where you can specify a return value if the entry doesn't exist. Data = map1.GetDefault("Test","Not Found") then you can test for that. If Data = "Not Found" ... Click to expand... I'll give it a shot. Thanks Steve.