Why does call not work used this way?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
Happyrever
Posts: 55
Joined: Sat Sep 10, 2011 12:22 pm

Why does call not work used this way?

Post by Happyrever » Sat Nov 19, 2011 4:04 pm

If I use
call "mouseup" of button "Get location" on card 2
to simulate a button click, it works as intended.
I had hoped this would simulate a clicked line in a similar way.
call "mouseup" of line 1 of field "Index" on card 2
It causes no error, but does nothing.

How can I simulate the action of clicking the line?

townsend
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 430
Joined: Sun Feb 13, 2011 8:43 pm

Re: Why does call not work used this way?

Post by townsend » Sat Nov 19, 2011 4:27 pm

Try...

Code: Select all

focus on field "Label"
focus on the mouseControl
focus on graphic "Move Me"

Happyrever
Posts: 55
Joined: Sat Sep 10, 2011 12:22 pm

Re: Why does call not work used this way?

Post by Happyrever » Sat Nov 19, 2011 4:43 pm

Thank you for that tip, I shall give it a try.

BvG
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 1239
Joined: Sat Apr 08, 2006 1:10 pm
Contact:

Re: Why does call not work used this way?

Post by BvG » Sat Nov 19, 2011 6:10 pm

To change the line of a list field, it's better to set the hilitedLines, because that will trigger the automatic os redraw stuff, and more importantly, also does not hijack the curser or moves it around.
Various teststacks and stuff:
http://bjoernke.com

Chat with other RunRev developers:
chat.freenode.net:6666 #livecode

Post Reply