Android Question how can I convert object to Int

khosrwb

Active Member
Licensed User
Longtime User
hi
how can I convert object to Int
I need to use from this code
B4X:
Dim b As Object

     b= listview4.GetItem(10)  
     d= List1.Get(b)
 

Cableguy

Expert
Licensed User
Longtime User
Being asked the same question in a Forum by DIFFERENT persons is one thing, but having the exact same question being asked 3 times by the same user, giving the exact same snippet as example in less than 2weeks...
 
Upvote 0

eurojam

Well-Known Member
Licensed User
Longtime User
Being asked the same question in a Forum by DIFFERENT persons is one thing, but having the exact same question being asked 3 times by the same user, giving the exact same snippet as example in less than 2weeks...

ohh, I haven't realize this...I wasn't sure that my answer is correct, but then, it seems to be correct....that are the good news
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
Without the rest of the code, and working with what you have given us, you have had 3 different answers that work. You just have to adapt one to your code OR provide a bit more of your code, maybe even share the project as zip, so that someone can try to see what's keeping it from working as expected.
 
Upvote 0

Cableguy

Expert
Licensed User
Longtime User
And, to the best of my knowledge, an objet cannot be converted... It's value can.
 
Upvote 0
Cookies are required to use this site. You must accept them to continue using the site. Learn more…