single and double click works on windows not on mobile

LiveCode is the premier environment for creating multi-platform solutions for all major operating systems - Windows, Mac OS X, Linux, the Web, Server environments and Mobile platforms. Brand new to LiveCode? Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
Lagi Pittas
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 366
Joined: Mon Jun 10, 2013 1:32 pm

single and double click works on windows not on mobile

Post by Lagi Pittas » Mon May 09, 2016 12:31 pm

Hi

I was tidying up my UI for a phone/tablet app by removing a button that changed if the user selected a line in a list field.

Worked perfectly on the desktop.

here is the code form the list field script

Code: Select all

local svalue 


on MouseUp
   add 1 to svalue
   if svalue > 1 then
      ClearTally -- If they doubleclick then it clears the whole list field
      put 0 into svalue
      exit mouseup
   end if --- <<---- Line 12
   send "toolate" to me in 0.4 seconds

end MouseUp

on Toolate
   if svalue = 1 then
      DeleteItem -- if they click on a line ask them if they want to delete the selected item
   end if
   put 0 into svalue
end Toolate

on DeleteItem
   local lnClicked, lcLabel, lnTotal, lnDiner, lcButton
   beep
 
   if GetYesno("DELETE the Selected Item?") is false then
      exit DeleteItem
   end if

  -- delete code here

end DeleteItem
   
An error pops up on the tablet with error 624 on line 12 column 16

Line 12 is the endif and error 624 is "wait aborted"

Simple question why does it work differently?

I increased the 0.4 seconds send "toolate" to 1 second and what it does execute the deletitem command but still brings up the error.
If I press ok to the error and answer yes or NO it it does nothing, but then EVERY other time it calls the clear tally (obviously svalue is never reset to zero).

Any ideas, suggestions gratefully accepted ?


Thanks

Lagi

Post Reply