David Martinez Member Licensed User Longtime User May 4, 2017 #1 I am trying to check if the picker is loaded or not. The code below errors out because the picker is empty. B4X: If Picker.GetItems(0).Size = 0 Then Any help would be appreciated...thanks.
I am trying to check if the picker is loaded or not. The code below errors out because the picker is empty. B4X: If Picker.GetItems(0).Size = 0 Then Any help would be appreciated...thanks.
Erel B4X founder Staff member Licensed User Longtime User May 4, 2017 #2 Which error do you get? Upvote 0
David Martinez Member Licensed User Longtime User May 4, 2017 #3 *** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array I put in 0 for the column element because I have to put something. Upvote 0
*** -[__NSArrayM objectAtIndex:]: index 0 beyond bounds for empty array I put in 0 for the column element because I have to put something.
Erel B4X founder Staff member Licensed User Longtime User May 4, 2017 #4 You cannot access the first column if you haven't previous set any item. Set the Tag property to "loaded" after you call SetItems. This will allow you to check the Tag property and know whether items were loaded or not. Upvote 0
You cannot access the first column if you haven't previous set any item. Set the Tag property to "loaded" after you call SetItems. This will allow you to check the Tag property and know whether items were loaded or not.
David Martinez Member Licensed User Longtime User May 4, 2017 #5 OK...cool trick. Thanks for your quick response! Upvote 0