Selecting Multiple Buttons in iOS

Randy Hengst iowahengst at mac.com
Fri Dec 2 13:35:13 EST 2011


Hi Jaque,

I've continued to play with this idea.

I've moved my handlers to the card script.

I have a variable set as a marker… it's made "true" in the mouseDown.

However, a mouseEnter does not seem to be sent while a dragging with the mouse (or your finger in iOS) down… neither does the mouseLoc() get updated…

The mouseEnter script does set the highlight when I just click a different button to set the flag... 

So, I can make each of the parts work.. .set the flag in mouseDown, use mouseEnter to highlight the button but, still no luck trying to combine them into one "swipe" type of move in iOS.

Any thoughts as to what I continue to mess up?

be well,
randy

On Nov 28, 2011, at 5:53 PM, J. Landman Gay wrote:

> On 11/27/11 8:28 PM, Randy Hengst wrote:
> 
>> I thought it would be nice to allow the user to select a button with
>> a tap and then slide(swipe) to the right or left to select other
>> buttons.
> 
> Create a script local variable to serve as a flag, and initialize it to false. When the first button gets a mouseDown, do its hiliting and set the flag variable to true. Write a mouseEnter handler that checks to see if the script local flag is true and if the target is one of the ten buttons in the row. If so, hilite that button. On mouseUp, set the flag to false so hiliting will stop.
> 
> The handlers should all be in the same script, probably the card script, so they can all read the flag status. There are other ways to do it but that's the easiest.
> 
> -- 
> Jacqueline Landman Gay         |     jacque at hyperactivesw.com
> HyperActive Software           |     http://www.hyperactivesw.com
> 
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode





More information about the use-livecode mailing list