Reducing Letters typed on a Push Button

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: Klaus, FourthWorld, heatherlaine, kevinmiller

Post Reply
Pencils212
Posts: 3
Joined: Sat Mar 28, 2015 2:31 pm

Reducing Letters typed on a Push Button

Post by Pencils212 » Sat Mar 28, 2015 2:37 pm

..........................
Last edited by Pencils212 on Sat Mar 28, 2015 7:47 pm, edited 3 times in total.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7405
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Reducing amount of characters (letters) allowed as usern

Post by dunbarx » Sat Mar 28, 2015 3:41 pm

Hi.

I would normally make you do a lot of work here, but my comrades would give me a lot of flack.

Make a field. In its script place:

Code: Select all

on keydown tKey
   if the length of me < 8 then pass keyDown
end keydown
Do you know what "me" is? Why does the term "tKey" exist at all? Why does the "8" work, when it seems that it should be "9"

Heh, heh.

Craig Newman

Pencils212
Posts: 3
Joined: Sat Mar 28, 2015 2:31 pm

Re: Reducing amount of characters (letters) allowed as usern

Post by Pencils212 » Sat Mar 28, 2015 4:38 pm

:D thanks so muchhhh!
Last edited by Pencils212 on Sat Mar 28, 2015 7:47 pm, edited 1 time in total.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7405
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Reducing amount of characters (letters) allowed as usern

Post by dunbarx » Sat Mar 28, 2015 6:07 pm

OK.

But don't you see where the test HAS to be?

Code: Select all

if the result is not "Cancel" and the length of it < 9 then
Now you do have homework. What do you do if the entry does indeed exceed eight chars? Certainly not just nothing, eh?

Craig

Pencils212
Posts: 3
Joined: Sat Mar 28, 2015 2:31 pm

Re: Reducing Letters typed on a Push Button

Post by Pencils212 » Sat Mar 28, 2015 6:57 pm

Thanks so much !!!

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

Re: Reducing Letters typed on a Push Button

Post by Lagi Pittas » Tue Mar 31, 2015 10:06 am

Hi

What was the actual question ? I don't have a Rosetta Stone to decipher "...................." :?

Lagi

Klaus
Posts: 12204
Joined: Sat Apr 08, 2006 8:41 am
Location: Germany
Contact:

Re: Reducing Letters typed on a Push Button

Post by Klaus » Tue Mar 31, 2015 12:15 pm

Hi Lagi,

yes, that's a bit strange, there was nothing illegal, immoral or fattening in the initial question!?
But everyone has its little daemons, right 8)


Best

Klaus

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7405
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Reducing Letters typed on a Push Button

Post by dunbarx » Tue Mar 31, 2015 1:50 pm

It makes me wonder how I made a decent response.

Craig

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

Re: Reducing Letters typed on a Push Button

Post by Lagi Pittas » Tue Mar 31, 2015 3:32 pm

Now you're both teasing .... or just .. :twisted:

SparkOut
Posts: 2407
Joined: Sun Sep 23, 2007 4:58 pm

Re: Reducing Letters typed on a Push Button

Post by SparkOut » Tue Mar 31, 2015 6:58 pm

IIRC I think it was about using the"ask" dialogue to obtain user input but restricting the possible input data.

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7405
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Reducing Letters typed on a Push Button

Post by dunbarx » Tue Mar 31, 2015 7:16 pm

IIRC I think it was about using the"ask" dialogue to obtain user input but restricting the possible input data.
It was indeed, though the language did not make that clear until the repost, the original sounding like it was data typed into a field.

Not sure what happened. The OP could certainly put empty into his post instead of deleting it. I wonder if it was a typo.

Craig

Post Reply

Return to “Getting Started with LiveCode - Complete Beginners”