custom propertieset woes

Claudi Cornaz claudi.c at fiberworld.nl
Fri May 27 10:08:13 EDT 2005


Hi Xavier,

It's strange isn't it.

I discovered already long time ago that sometimes to get a program
to work correctly you have to do weird things. So I tried to put the
part to get the cusomprops in a new function like

-- ***
function GatherAllSubs pLine
   put word 2 to -1 of pLine into tGatheredList
   put GetPropName(tGatheredList) into tPropName
   put DoGetList(tPropName) into tSubList          -- >>>>>
  -- put "put the" && tPropName & "[uSubList]" && "of fld" && quote & 
"topicList" & quote && "into tList"  into tCommandStr
  --  do tCommandStr
  -- tSubList now contains the list exactly as it would appear in the 
topicList fld. Now proces this list
   repeat for each line tTopic in tSubList
  . . .
  . . .
  . . .
   return tGatheredList
end GatherAllSubs

function  DoGetList pPropName
   put "put the" && pPropName & "[uSubList]" && "of fld" && quote & 
"topicList" & quote && "into tSubList"  into tCommandStr
   do tCommandStr
   return tList
end DoGetList


And guess what, now it works flawless.
Isn't this weird? Why would 2 lines of code not work in a function while
the exact same two lines of code moved to
a new, second function, work like a charme.
It's got me stumped, but anyway it works and I can continue coding 
(altough I certainly would feel a lot better if I understood what's 
going on.

Thanks a lot for the quick response. This list is truly amazing.

Best wishes

Claudi


More information about the use-livecode mailing list