string.contains() issue

pcbtmr

Member
Licensed User
Longtime User
Have a listview that gets selected. Once Item is Clicked (Value is set) compiler balks at
if Value.contains("*")
on the word contains though it is part of the core keywords.
Any ideas?

Thanks.
 

margret

Well-Known Member
Licensed User
Longtime User
Compiler Error

Have a listview that gets selected. Once Item is Clicked (Value is set) compiler balks at
if Value.contains("*")
on the word contains though it is part of the core keywords.
Any ideas?

Thanks.

Value is a Keyword and should not be used as a variable. Seems the object is missing, maybe something like:

ListView1.Value.Contains("*")

Thanks,

Margret
 
Upvote 0

klaus

Expert
Licensed User
Longtime User
In your ListView1_ItemClick routine you should define a variable as a String, or you could define it in Sub Globals or Sub Process_Globals.
B4X:
Dim Item as String
Item = Value
If Item.Contains("*") then
.
.
This works.

Best regards.
 
Upvote 0
Top