iOS Question B4i CLV problem getting card data

james_sgp

Active Member
Licensed User
Longtime User
Hi, I have a B4Xpages app; where I display data on a xCLV Card. There is a button on each card, that when pressed should open a URL based on data on that card.
The following works perfectly on B4a, and I can open the URL. But in B4i I`m getting ?? as the contents of the label, instead of 1628078985049.

B4X:
Private Sub view_upload_Click
    Dim index As Int = view_clv1.GetItemFromView(Sender)
    Dim p As B4XView = view_clv1.GetPanel(index)    'base panel
    Dim pp As B4XView = p.GetView(0)     'card panel
   
    Log(pp.GetView(19).text)
       
    Dim URL As String = main_page.strURL & "/uploads/" & pp.GetView(19).text & ".pdf"

I have confirmed the label on the card has the data in it (both visually and programmatically), I have confirmed the label is in the same position in the tree (i.e. position 19).
All code is within the same B4Xpage, and pages aren`t getting changed. xCLV is populated, then the button is pressed....

The attached image shows CLV card items 'logged' on the left, and the layout tree`s on the right. As you can see all objects are fine up to 'view_filename', where the text shown for B4i is actually from 'view_con9' (item 22); almost like something is shifting the index down 4 rows?

Would appreciate any guidance...

Thanks, James
 

Attachments

  • Clipboard01.jpg
    Clipboard01.jpg
    138 KB · Views: 196
Last edited:

james_sgp

Active Member
Licensed User
Longtime User
SOLVED.....Ok, I just gave myself the clue...

I have 4 buttons on the CLV card, if I change their position in the tree to below 'view_filename' I do not get the correct value. So it seems that in B4i buttons create extra items in the layout, compared to B4a.

Does anyone have any comments on this, or seen it before?

James
 
Upvote 0
Top