Center a dropped object on a grid

Anything beyond the basics in using the LiveCode language. Share your handlers, functions and magic here.

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

rumplestiltskin
Posts: 229
Joined: Wed Jun 21, 2006 7:33 pm
Contact:

Re: Center a dropped object on a grid

Post by rumplestiltskin »

Jacque,

I altered your solution just a bit to return the ID of the graphic rather than a name. I now don't have to worry about naming the graphics as the ID is, of course, unique. It's also very fast.
rumplestiltskin
Posts: 229
Joined: Wed Jun 21, 2006 7:33 pm
Contact:

Re: Center a dropped object on a grid

Post by rumplestiltskin »

You let enough time go by without practice and you forget what you've learned. When I taught coding for seniors, I said "Google is your friend" and, sure enough, tonight while I was trying to find a solution to my coding issue, Google returned this thread which I started over eight years ago. The solution was here just waiting for me. :D

Barry
jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7423
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: Center a dropped object on a grid

Post by jacque »

So true. It's happened to me too, and sometimes it's something I answered myself years ago. 🙂
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com
Post Reply