Not sure if this is a compile error or something, but I have something that used to work (way back in the days of iOS11), and now doesn’t and since the code hasn’t changed, I’m wondering if it’s a compile issue. I have a UISegmentedControl on a tableviewcontroller, and in the ValueChanged method, this used to work:
case UISegmentedControl(sender):selectedSegmentIndex of 0: DataAccess.sharedInstance.settings.searchFields := searchFieldsType.all; 1: DataAccess.sharedInstance.settings.searchFields := searchFieldsType.justBinNumbers; 2: DataAccess.sharedInstance.settings.searchFields := searchFieldsType.justHandheldCodes; end;
but now it doesn’t, but if I change it to this, it works:
if UISegmentedControl(sender):selectedSegmentIndex=0 then DataAccess.sharedInstance.settings.searchFields := searchFieldsType.all
else if UISegmentedControl(sender):selectedSegmentIndex=1 then DataAccess.sharedInstance.settings.searchFields := searchFieldsType.justBinNumbers
else if UISegmentedControl(sender):selectedSegmentIndex=2 then DataAccess.sharedInstance.settings.searchFields := searchFieldsType.justHandheldCodes;