keeping track of the open cards for update

Dr. Hawkins dochawk at gmail.com
Thu Jul 25 10:47:56 EDT 2013


As my project moves along, it's handling remote updates of data and
displaying it live locally (watches for database updates).

I'm about to move on to making these live in multiple windows (i.e.,
the input window, and one or more output windows).  This means that
the update code needs to quickly deal with all the open windows.
Typically either one or up to a half-dozen fields would update in any
open window--but as many as 50 or even 100  could happen under certain
circumstances.

For keeping track of upon windows, it seems that something like

on openCard
 ...
  put space & the id of this card after gUpdateCards
end openCard

on closeCard
  replace space & the id of this card with upty in gUpdateCards
end closeCard


and then, something like

repeat for each word cdid in gUpdateCards
  if exists fld upFld of cd cdId then
    do stuff to put it in the field
  end if
end repeat

or will it be faster to keep lists in variables, arrays, or custom
properties of cards?

if upFld is among the updateFields of cd cd id then . . .

OR

if upFld is among the keys of upFlds[cdid][upFld] then . . .


thanks for ny thoughts

-- 
Dr. Richard E. Hawkins, Esq.
(702) 508-8462




More information about the use-livecode mailing list