Something simple

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
dalkin
Posts: 183
Joined: Wed Jul 04, 2007 2:32 am
Contact:

Something simple

Post by dalkin » Sun Jul 22, 2007 10:18 pm

If anyone has the time:

Create new stack, put one button and one image area.

To the button, attach:

on mouseDown
choose eraser tool
end mouse Down

This doesn't return the eraser in my case and I'm wondering whether it's a Mac thing, a Rev thing, or whether my computer is developing the ability to inflict pain.

Mark
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 5150
Joined: Thu Feb 23, 2006 9:24 pm
Contact:

Post by Mark » Sun Jul 22, 2007 11:59 pm

Dear dalkin,

You are right. Only after using the eraser tool once, I can use the choose command to activate the eraser tool by script.

The RunRev team encountered this bug too. They decided to work around it by adding the following line in the tools palette:

...set the eraser to the eraser

So, your script should be:

Code: Select all

on mouseDown
  choose eraser tool
  set the eraser to the eraser
end mouseDown
Best regards,

Mark
The biggest LiveCode group on Facebook: https://www.facebook.com/groups/livecode.developers
The book "Programming LiveCode for the Real Beginner"! Get it here! http://tinyurl.com/book-livecode

dalkin
Posts: 183
Joined: Wed Jul 04, 2007 2:32 am
Contact:

Post by dalkin » Mon Jul 23, 2007 12:02 am

Right on the money, Mark. Thanks.

Post Reply