Signature Block

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Signature Block

Post by arkstar » Mon Feb 16, 2015 1:29 am

I've reviewed the posts about drawing lines, however it seems it works anywhere on the card.
I'm trying to create a signature block where someone can sign but it is constrained in a defined area.
Any ideas? Thanks!
Rob
Rob Glassman
ArkStar

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10043
Joined: Sat Apr 08, 2006 7:05 am
Contact:

Re: Signature Block

Post by FourthWorld » Mon Feb 16, 2015 2:18 am

An image object will constrain paint operations within its rect.
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 10305
Joined: Wed May 06, 2009 2:28 pm

Re: Signature Block

Post by dunbarx » Mon Feb 16, 2015 3:54 am

Hi.

Does Richard's comment address what you need? That the user literally "signs" in, like one does at a supermarket, where you sign your name in one of those electronic pads to close a credit card transaction? So the user would paint something into an image area, or sign their name in that area?

Craig Newman

arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Re: Signature Block

Post by arkstar » Mon Feb 16, 2015 7:41 am

I believe that answers my question. Its a app for work orders. The client is required to sign the order.
Thanks!

Rob
Rob Glassman
ArkStar

arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Re: Signature Block

Post by arkstar » Mon Feb 16, 2015 2:25 pm

Hi again,

I'm not getting something correct. The code doesn't work on an image. It's just to write their name as an acknowledgement of service.
Do you have a sample routine you could share? Thanks

Rob
Rob Glassman
ArkStar

WaltBrown
Posts: 466
Joined: Mon May 11, 2009 9:12 pm

Re: Signature Block

Post by WaltBrown » Mon Feb 16, 2015 3:16 pm

I put this in an image area script:

Code: Select all

on mouseEnter
   choose the pen tool
end mouseEnter

on mouseLeave
   choose the browse tool
end mouseLeave
And it appeared to work OK.
Walt
Walt Brown
Omnis traductor traditor

arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Re: Signature Block

Post by arkstar » Mon Feb 16, 2015 4:02 pm

Thanks Walt!

I tried that same code earlier and it did not work for me but now it did.
Thanks again!

Rob
Rob Glassman
ArkStar

arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Re: Signature Block

Post by arkstar » Mon Feb 16, 2015 4:05 pm

Sorry, but one more question... Is there a way to clear that drawing?
Rob Glassman
ArkStar

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Signature Block

Post by Klaus » Mon Feb 16, 2015 4:16 pm

Hi Rob,
arkstar wrote:Is there a way to clear that drawing?
...
put empty into img XXX
...
:D


Best

Klaus

arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Re: Signature Block

Post by arkstar » Mon Feb 16, 2015 4:34 pm

Thanks Klaus,

That erases the whole img. I just want to clear the writing created with the pen tool...

Rob
Rob Glassman
ArkStar

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: Signature Block

Post by Klaus » Mon Feb 16, 2015 5:00 pm

Hi Rob,

ah, I see, but I'm afraid this is not possible right out of the box.

Quick thought:
You may need to save every modified "snapshot" of your image maybe "on mouseup" so you can
"return" to each last state of the image. Know what I mean?

But I have no idea WHAT state (how many "mouseups" ago) actually reflects the last complete signature.

However that should not be a problem at all, if the signature is the only "content" of that image!
Not?


Best

Klaus

arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Re: Signature Block

Post by arkstar » Mon Feb 16, 2015 5:06 pm

Hi Klaus,

I had the same thought...

Thanks!
Rob
Rob Glassman
ArkStar

Dixie
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 1336
Joined: Sun Jul 12, 2009 10:53 am

Re: Signature Block

Post by Dixie » Tue Feb 17, 2015 1:51 am

Hi...

This will work for you... just sign your life away !
all you would have to do then, is export a snapshot of the signature to wherever it needs to go :-)
Attachments
signatureblock.livecode.zip
(1.95 KiB) Downloaded 323 times

arkstar
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 70
Joined: Mon Dec 21, 2009 1:51 am

Re: Signature Block

Post by arkstar » Tue Feb 17, 2015 9:07 am

That's perfect Dixie! Thanks!
Rob Glassman
ArkStar

Post Reply