At the bottom of this block there s a [ListView.Elements = ] statement. During run time it does fire, regardless of where I put it... If I right click and tap Do it, then it works... but not by itself, am I missing something? Is it about the list? or the Listview?
I have simplified it...lol
ABG, It's a list that counts components of a menu item, chicken pot roast eg, chicken, potatoes, carrots etc, and compares them to a defined dietary requirements list, and calculates the percentage of 'compliant' components.
I have used the list view with details etc many times, so the fact that it isn't executing is confusing.
I have placed it in all parts of the event structure, to no avail. I have noticed that sometime AI2 will hiccup from time to time, I am wondering if this one of those times, ghost in the machine, so to speak.
I have since moved the offending block to a long click on the same button. I tried it in a procedure to no avail, I surrounded it with Alerts, but it never fired. It fires with the long click
What the blocks do is take each component of the menu items, chicken and rice eg, extracts the components, chicken, rice, veggies, salad... etc, and compares each item with a pre-existing diet plan, a list of acceptable food items on a given diet, for example, a mediterranean diet, a diabetic diet, a celiac diet etc (User outs in diet information) and reports back the percentage of acceptable components. For example, the chicken and rice would report back 75% on a vegetarian diet.
It seemed pretty straight forward until I wanted to display the results...
I went back and put the block back in at the bottom, and then added the refresh block, nothing. It just does not go. If I long click, and get the information to show, it works, but if I single click back on the same button, it returns to the former list
As it is currently a private app for my family, I am not overly concerned, but if i ever had a publicly available version, it would be nice to get the bottom of this issue.
doing it now, Tim, I've been really busy at work, not had a chance to do much here.
I'll let you know what happens.
Nothing happens, until I longclick on the button, then I see all the random integers set up is the example.
I simplified it further by remove the CreateElement block and adding just random integers to the list, and still nothing until I long click, then get a list of random integers
I just checked another Event, when any Button.Click, and a procedure superseding the Dx button is called... the procedures were resubmitted outside of the pertinent IF statement.
I shall go sit in the corner with the required dunce cap on and revisit procedural order 101
Thanks Tim, ABG and all else that helped bring my thinking into order. Goes to show that no matter how thorough you can be, there is always a tick waiting to trip you up somewhere on the road to successful execution.
the last two procedures, [create_and_view_menu_data] and [recreate_components] accidentally got left outside the IF statement. No errors caught, no mishaps, just a ghost in the machine. Now they are firmly nestled within their appropriate positions, things work as they should.