rbghongade Active Member Licensed User Longtime User Aug 22, 2019 #1 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: Aug 22, 2019
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;
BillMeyer Well-Known Member Licensed User Longtime User Aug 22, 2019 #2 Look here: https://www.b4x.com/android/forum/t...ortable-searchable-customizable-table.102322/ especially No: 3 in the first post - it's the same for B4J. Upvote 0
Look here: https://www.b4x.com/android/forum/t...ortable-searchable-customizable-table.102322/ especially No: 3 in the first post - it's the same for B4J.
rbghongade Active Member Licensed User Longtime User Aug 22, 2019 #3 Thanks, Had already seen the example posted in the link, but getting the runtime error! Upvote 0
DonManfred Expert Licensed User Longtime User Aug 22, 2019 #4 you are giving a string, not a list. java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object; Click to expand... so in your case B4X: B4XTable1.SetData(op) op seems to be a string? Upvote 0
you are giving a string, not a list. java.lang.ClassCastException: java.lang.String cannot be cast to [Ljava.lang.Object; Click to expand... so in your case B4X: B4XTable1.SetData(op) op seems to be a string?
rbghongade Active Member Licensed User Longtime User Aug 22, 2019 #5 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
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.
rbghongade Active Member Licensed User Longtime User Aug 22, 2019 #6 Finally sorted out! Thank you guys! I missed: B4X: op.Add(Array(y)) Upvote 0