H Holger Brauer Member Licensed User Feb 19, 2016 #1 Hello, perhaps someone can help me. I create a ListView named LV_events: LV_events.AddSingleLine2(TEMPname, TEMPuserid & TEMPadress). All Strings have fixed lenghts. On a click I want to extract TEMPuserid and TEMPadress from the Value Sub LV_events_ItemClick (Position As Int, Value As Object) Dim getstring As String getstring = "" & Value but after that, getstring is not a string. I want to use sf.left(getstring ...) to extract parts of the 'value as object' Thank you
Hello, perhaps someone can help me. I create a ListView named LV_events: LV_events.AddSingleLine2(TEMPname, TEMPuserid & TEMPadress). All Strings have fixed lenghts. On a click I want to extract TEMPuserid and TEMPadress from the Value Sub LV_events_ItemClick (Position As Int, Value As Object) Dim getstring As String getstring = "" & Value but after that, getstring is not a string. I want to use sf.left(getstring ...) to extract parts of the 'value as object' Thank you
DonManfred Expert Licensed User Longtime User Feb 19, 2016 #2 You are not setting any value in your Code: Copy LV_events.AddSingleLine2(TEMPname, TEMPuserid & TEMPadress) Code: Copy For i = 0 To 2 Dim value As Map value.Initialize value.Put("line1",TEMPname) value.Put("line2",TEMPuserid & TEMPadress) LV_events.AddTwoLines2(value.Get("line1"), value.Get("line2"), value) Next Code: Copy Sub lv_ItemClick (Position As Int, Value As Object) Dim retmap As Map retmap = Value Log("Item at Pos "&Position&" Clicked...") Log("ItemInfos:") Log("line 1 = "&retmap.Get("line1")) Log("line 2 = "&retmap.Get("line2")) End Sub Upvote 0
You are not setting any value in your Code: Copy LV_events.AddSingleLine2(TEMPname, TEMPuserid & TEMPadress) Code: Copy For i = 0 To 2 Dim value As Map value.Initialize value.Put("line1",TEMPname) value.Put("line2",TEMPuserid & TEMPadress) LV_events.AddTwoLines2(value.Get("line1"), value.Get("line2"), value) Next Code: Copy Sub lv_ItemClick (Position As Int, Value As Object) Dim retmap As Map retmap = Value Log("Item at Pos "&Position&" Clicked...") Log("ItemInfos:") Log("line 1 = "&retmap.Get("line1")) Log("line 2 = "&retmap.Get("line2")) End Sub
DonManfred Expert Licensed User Longtime User Feb 19, 2016 #3 Sorry. I did not read your post right. Code: Copy LV_events.AddSingleLine2(TEMPname, TEMPuserid & TEMPadress). Will add TEMPname into the listview and TEMPuserid&TEMPadress into the value. As one concenated string Code: Copy Sub LV_events_ItemClick (Position As Int, Value As Object) Dim getstring As String = Value should give you this string. Maybe it is just another issue you have here? Maybe i misinterpreted the problem; or i dont see it Holger Brauer said: but after that, getstring is not a string Click to expand... What is getstring in your app? I mean; what does Code: Copy log(getstring) put into the log? Upvote 0
Sorry. I did not read your post right. Code: Copy LV_events.AddSingleLine2(TEMPname, TEMPuserid & TEMPadress). Will add TEMPname into the listview and TEMPuserid&TEMPadress into the value. As one concenated string Code: Copy Sub LV_events_ItemClick (Position As Int, Value As Object) Dim getstring As String = Value should give you this string. Maybe it is just another issue you have here? Maybe i misinterpreted the problem; or i dont see it Holger Brauer said: but after that, getstring is not a string Click to expand... What is getstring in your app? I mean; what does Code: Copy log(getstring) put into the log?
DonManfred Expert Licensed User Longtime User Feb 19, 2016 #4 Another approach you can adapt to your code Code: Copy Dim value As Map value.Initialize value.Put("line1",TEMPname) value.Put("userID",123) value.Put("Adress","My secret address") value.Put("Tel","0815") lv.AddSingleLine2(value.Get("line1"), value) Upvote 0
Another approach you can adapt to your code Code: Copy Dim value As Map value.Initialize value.Put("line1",TEMPname) value.Put("userID",123) value.Put("Adress","My secret address") value.Put("Tel","0815") lv.AddSingleLine2(value.Get("line1"), value)
H Holger Brauer Member Licensed User Feb 19, 2016 #5 It works (Dim getstring As String = Value) Would say, people are right to talk about GodManfred ... Next beer in Düsseldorf is on me Upvote 0
It works (Dim getstring As String = Value) Would say, people are right to talk about GodManfred ... Next beer in Düsseldorf is on me
mangojack Expert Licensed User Longtime User Feb 19, 2016 #6 Holger Brauer said: people are right to talk about GodManfred ... Click to expand... @Holger Brauer .. Dont over do it too much ! ... he wont sleep tonight .. and we need him fresh for tomorrow Upvote 0
Holger Brauer said: people are right to talk about GodManfred ... Click to expand... @Holger Brauer .. Dont over do it too much ! ... he wont sleep tonight .. and we need him fresh for tomorrow