B4J Question Populating B4X Table...

rbghongade

Active Member
Licensed User
Longtime User
Hi,
How to populate the cells in B4X Table from a generated array or list?
I have created a list named "op" containing string type data.
When I use
B4X:
B4XTable1.SetData(op)
I get the error:
B4X:
java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object;
 
Last edited:

DonManfred

Expert
Licensed User
Longtime User
you are giving a string, not a list.
java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object;

so in your case

B4X:
B4XTable1.SetData(op)
op seems to be a string?
 
Upvote 0

rbghongade

Active Member
Licensed User
Longtime User
op is a list as i have populated it with :
B4X:
op.Add(y)
where y is a string generated with "NumberFormat" in a loop.
 
Upvote 0
Top