Pi_ Posted July 10, 2014 Share Posted July 10, 2014 Hi, I have a problem with reading data from a popup list I just populated. there are 2 popup lists: the first (list01): HEA HEB IPE UPN when you make a choice a second list is populated (list02): HEA100 HEA120 HEA140 ... or IPE100 IPE120 ... this works fine, list02 gets populated (vsoWidgetPopupAdd in the '41' event) but when I want to read list02 standard value it is NIL. example: you change list01 to HEB, list02 is populated and the first item (HEB100) is visible in the object panel, but I can't read this value. Only when I change list02 (ex. HEB200) I can read back this value. I tried reseting the PIO in the '41' event or before reading the value (in the '3' event) but this doesn't work. I also tried setting list02 to this value (vs.vsoWidgetPopupSet and vs.SetRField) without succes Is this a bug or am I doing something wrong? Quote Link to comment
Hippocode Posted July 15, 2014 Share Posted July 15, 2014 (edited) When you fill a list you don't select anything. It does appear like that because the oip/ dialog shows the first result. You can A) Force selected the first/any other item when filling it. B) Code your result this way that if index = (0 or -1 don't really know what it returns in this case ) it should take the first item. When I work with lists I make sure I have the array of the list choices. Declare an integer 0 and get the selected index. Selected or not, it will atleast return the first index being 0. Edited July 15, 2014 by hippothamus Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.