Recursion limit error

Jeff Massung massung at gmail.com
Sun Jun 20 14:03:51 EDT 2010


I do splitters/dividers like so:
---

local sDragging

on mouseUp
   put false into sDragging
end mouseUp

on mouseRelease
   put false into sDragging
end mouseRelease

on dragStart
   put true into sDragging

   -- continue processing until the mouse button is let go
   repeat while sDragging is true
      -- choose either the X or Y component of the mouse
      get item [1|2] of the mouseLoc

      -- constrain the split position
      put min([max split position], it) into it
      put max([min split position], it) into it

      -- update whatever property holds the current split position
      set the cSplit[H|V] of this card to it

      -- this is likely a card handler, but to-be implemented by you
      updateGeometry

      -- let other controls respond to various events
      wait 0 seconds with messages
   end repeat
end dragStart


Hope this helps,

Jeff M.



More information about the use-livecode mailing list