Tracking different behavior from Standalone to IDE

Chipp Walters chipp at chipp.com
Wed Feb 6 16:42:09 EST 2008


Interesting.

I'm creating a realtime project manager, sorta like the old MacProject, but
with more lines (wires). You can drag the little 'tiles' around, hook them
up to other 'tiles', etc. Fun stuff. For this sorta thing, I typically use a
display list manager, so I can easily perform multiple undos, redos and
load/unload 'projects.'

So, part of my display list manager is the display list renderer. It walks
through the list and renders the tiles and associated connecting lines.
During this process, I'm creating quite a few lines, and naming them on the
fly. For naming them I'm using this function (Chris helped me with) to
create unique names:

function GUID
  put "" into tGUID
  put binarydecode("H*",md5digest(the hostname & the milliseconds),tGUID)
into t
  return tGUID
end GUID

Works like a champ. But when I created a standalone, the wires didn't
'track' correctly and got all messed up. It turns out they were being
created and named FASTER than 1 per 1000th of a second! Who would've
guessed. So, I changed the GUID function thusly:

function GUID
  put "" into tGUID
  wait 1 millisecs
  put binarydecode("H*",md5digest(the hostname & the milliseconds),tGUID)
into t
  return tGUID
end GUID

Anyway, I couldn't believe how fast Rev created these lines.



More information about the use-livecode mailing list