Tereza Snyder wrote: >> new and improved... no flashy text... >> >> on xy >> repeat until the mouseClick >> get the mouseLoc&&" horz:"&the mouseH&&" vert:"&the mouseV >> if it is not lastxy then >> put it >> put it into lastxy >> end if >> end repeat >> end xy > > To avoid bottling up the engine servicing your loop: > > on mouseMove mX, mY > put format( "horz: %d vert: %d", mX, mY ) > end mouseMove > > Scott Raney has told us in the past that "repeat until the mouseClick" is > not a good idea because it bolixes up the event handling in the engine. I've > found that mouseMove works wonderfully in situations where you'd be tempted > to use "repeat until the mouse is up" or similar loops.
Very true, but in this case it turns a very simple handler into a project. :) The example you posted has a different effect than the goal being met by the others: HC's traditional xy handler is invoked only until the mouse is clicked, and then stops. Using a mousemove handler is an always-on proposition, requiring a second handler to invoke it by setting a flag, and a modification to the mousemove to check that flag. Since xy is the only thing running when it's used, the performance degredation is less of an issue. -- Richard Gaskin Fourth World Media Corporation Custom Software and Web Development for All Major Platforms Developer of WebMerge 1.9: Publish your database on the Web ___________________________________________________________ [EMAIL PROTECTED] http://www.FourthWorld.com Tel: 323-225-3717 AIM: FourthWorldInc _______________________________________________ metacard mailing list [EMAIL PROTECTED] http://lists.runrev.com/mailman/listinfo/metacard
