Drawing a blank on simple code...

Paul Dupuis paul at researchware.com
Tue May 19 17:18:54 EDT 2020


I have a set of custom properties in stack "X", a lot of which begin 
with "options_<somename>"

I want to loop through them and get the values, so I have:

   local tDisplayList
   put the customKeys of stack "X" into tProperties
   filter lines of tProperties with "options_*"
   if tProperties is empty then exit to top

   repeat for each line tLine in tProperties
     put the customKeys[tLine] of stack "X" into tProp

     -- do stuff here
   end repeat


When I walk through this code in the debugger, I see that tProperties 
gets a list of the names of all custom properties in the "X" stack. YEA!

Then I see that that list correctly gets filtered to just those that 
begin with "options_" YEA!

Then I see the in the repeat loop the variable "tLine" get the name of 
each "options" property in succession. YEA!

PROBLEM: put the customKeys[tLine] of stack "X" into tProp DOES NOT 
fetch the value of the indicated property into tProp????

I know this is simple - and I have coded it before - but I can seem to 
find my past code in prior projects and obviously am missing something.




More information about the use-livecode mailing list