Seeking elegance-1 
    SB 
    aj445 at traverse.lib.mi.us
       
    Fri Jan 14 15:06:40 EST 2005
    
    
  
Hi all,
OK, I've got a stack working, now I want to make it less klunky.
Right now, the user answers questions in a series of Question & Answer 
cards, and when they go to the Summary card, all the questions and 
responses are listed in one scrolling text field.
It is automatic-- every time the Summary card is opened, there is a new 
summary added on top of the old one, and all are saved.
the script--
on openCard
   summarize
   pass openCard
end opencard
on Summarize
   repeat with i = 1 to the number of cds of bg "Q&A"
     put (bg fld "Question" of cd i of bg "Q&A") & return after 
theSummary
         put (bg fld "Response" of cd i of bg "Q&A") & return & return 
after theSummary
   end repeat
   put the long date & return & theSummary before cd fld "Destination" 
of cd "List"
end Summarize
Of course, this means that EVERY time the summary page is opened, there 
is a new set appended to the old-- this can add up if you thrash around 
in the stack a while!
One solution might be to only do the update if the answers on the Q&A 
cards have changed.
How would this be done?
Thanks!
Sandy
    
    
More information about the use-livecode
mailing list