grant1842 Active Member Licensed User Longtime User Apr 29, 2015 #1 I am trying to add some items to a listview. THis compiles fine. Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call"),Cursor1.GetString("name")) When I try to add another string from sql i get error. Code: Copy Parsing code. 0.02 Compiling code. Error Error compiling program. Error description: Missing parameter. Occurred on line: 67 ListView1.AddTwoLines(Cursor1.GetString("call")&" " &Cursor1.GetString("call")&", " & Cursor1.GetString("name")) Word: ) Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call")&" " &Cursor1.GetString("call")&", " & Cursor1.GetString("name")) Thanks for your help.
I am trying to add some items to a listview. THis compiles fine. Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call"),Cursor1.GetString("name")) When I try to add another string from sql i get error. Code: Copy Parsing code. 0.02 Compiling code. Error Error compiling program. Error description: Missing parameter. Occurred on line: 67 ListView1.AddTwoLines(Cursor1.GetString("call")&" " &Cursor1.GetString("call")&", " & Cursor1.GetString("name")) Word: ) Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call")&" " &Cursor1.GetString("call")&", " & Cursor1.GetString("name")) Thanks for your help.
NJDude Expert Licensed User Longtime User Apr 29, 2015 #2 That's because you are missing the SECOND line. Change this line from: Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call")&" " &Cursor1.GetString("call")&", " & Cursor1.GetString("name")) to: Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call") & " " & Cursor1.GetString("call"), Cursor1.GetString("name")) Upvote 0
That's because you are missing the SECOND line. Change this line from: Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call")&" " &Cursor1.GetString("call")&", " & Cursor1.GetString("name")) to: Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call") & " " & Cursor1.GetString("call"), Cursor1.GetString("name"))
LucaMs Expert Licensed User Longtime User Apr 29, 2015 #3 The variables do not cost much. Often compact code is more harmful than useful. Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call") & " " & Cursor1.GetString("call"), Cursor1.GetString("name")) Code: Copy Call = Cursor1.GetString("call") Name = Cursor1.GetString("name") ListView1.AddTwoLines(Call & " " & Call, Name) In this case, you can also move the mouse pointer on Name (setting a breakpoint on ListView...) to check its value, can you do it using the "compact format"? I hate compact code: we are not developing in Assembler! (Call & Call ?!?!) (wow, this post is very inherent to the question ) Upvote 0
The variables do not cost much. Often compact code is more harmful than useful. Code: Copy ListView1.AddTwoLines(Cursor1.GetString("call") & " " & Cursor1.GetString("call"), Cursor1.GetString("name")) Code: Copy Call = Cursor1.GetString("call") Name = Cursor1.GetString("name") ListView1.AddTwoLines(Call & " " & Call, Name) In this case, you can also move the mouse pointer on Name (setting a breakpoint on ListView...) to check its value, can you do it using the "compact format"? I hate compact code: we are not developing in Assembler! (Call & Call ?!?!) (wow, this post is very inherent to the question )
DonManfred Expert Licensed User Longtime User Apr 29, 2015 #4 LucaMs said: Often compact code is more harmful than useful. Click to expand... No problem if you can read what you wrote later But you are right. Splitting some things into multiple lines can help much while debugging Upvote 0
LucaMs said: Often compact code is more harmful than useful. Click to expand... No problem if you can read what you wrote later But you are right. Splitting some things into multiple lines can help much while debugging
grant1842 Active Member Licensed User Longtime User Apr 29, 2015 #5 Solved Thanks for all comments . Upvote 0