Boxes, Grids, & Snap to Objects

Scott Raney raney at metacard.com
Wed Feb 20 12:49:00 CST 2002


On Tue, 19 Feb 2002 Klaus Major <kmajor at metascape.org> wrote:

> I regularly use "repeat until the mouseClick" without the same 
> problems I experience with the mouse function. My question is: Does 
> the advice to stay away from polling the mouse extend to the 
> mouseClick function as well? Scott has warned that the mouse() 
> function may/will be discontinued. How about mouseClick()? Is it also 
> in jeopardy?

Yes.  The full list of functions to avoid because they are deprecated is:
the mouse
the mouseClick
the mouseH
the mouseV
the mouseLoc
the optionKey
the commandKey
the controlKey

And the very worst thing to do with any of these is "repeat until
<function>", which will condemn you to the fires of eternal damnation
in multiuser hell ;-)

The last 3 can be safely acquired with "the keysDown", but be careful
to not sit in a repeat loop calling that or you may hang your app or
at the very least have the gods of multiuser development strike you
down.

And while we're on the subject of bad technique that will cause you
grief at some point, also avoid using the following messages:
mouseStillDown
mouseWithin
idle

That's it.  Not a long list, and in all cases it's very easy (I would
even in most cases say trivial) to do it the right way.  A small price
to pay for shrugging off the last of the circa 1984 single-user
single-tasking design of MacOS and HyperCard.
  Regards,
    Scott

> -- 
> Jim Hurley

********************************************************
Scott Raney  raney at metacard.com  http://www.metacard.com
MetaCard: You know, there's an easier way to do that...




More information about the use-livecode mailing list