OK this is a crazy idea. I have a little app that looks at a folder and generates a list of all files therein with a particular extension. It displays that list in a text list object. If I click on the name of a file in that list, another text list will show me what’s in the file, all nicely broken out into columns. It looks a little like this:
just fort kicks, there is another list at the right edge that displays the field names from the text list just to its left so i can click through the list at the top and see how my vendor is making me miserable by changing the field names every single day. I want to write a new procedure that tabulates the field names in each file along with the filename so i can draft a sternly worded memorandum to said vendor to institute a little consistently in their deliveries (while I figure out a way to have my application figure out how to deal with the issue programmatically)
So far, so good. In Panorama 6, I would have had all the code to populate the various text list objects in a procedure, nicely labeled for reuse in other areas… but since we’re on X now, I’ve defined my fileglobals in a procedure but packed most of the code into the individual text lists as expressions with side effects. For example, the main table is made by putting this in the formula box:
catcherror(“nothing selected yet)”, ignore("", assign(fileload(fg_folder+fg_chosenfile),“fg_filecontents”))+arraydelete(""+fg_filecontents[search(fg_filecontents,“Column”)+7,-1],2,3,cr())
Yeah, i thought it was pretty clever too! Here (finally) is my question. Now, I want to loop array through all the files in that list, and I will do it in a procedure. But all my clever code blocks are in objects now. I could copy them from the objects and into a procedure, but that is soooo last season. What I want to to is use a procedure to simulate clicking through each item in the top list, and aggregate the results of the formula in the rightmost list into a variable.
Is there any way to simulate user clicks in the text object programmatically and then just append the data from the appropriate variable to my little looparray stack?
I made this procedure- it runs and the result shows all the right filenames but none of the data that the rightmostlist WOULD have generated (had the top list actually been clicked) is there It’s just the data from the first file repeated over and over (which is what i expected would happen)
I am looking for an object command that will do this but i am not seeing one…
I hope that made at least a speck of sense!