Looking for CR/LF

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
Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Looking for CR/LF

Post by Andycal » Mon Jul 28, 2008 5:24 pm

This is causing me a headache at the minute, and I'm sure it's easy...

I've got a text field on a stack and I want to type in a bunch of numbers, hit enter and then have RunRev do somthing based on that number.

I'm guessing I'm looking for 'rawkeydown' or something?

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

Post by Mark » Mon Jul 28, 2008 6:12 pm

Hello Andycal,

First the title of this forum thread. Cr and lf, and also crlf, are constants in Revolution. Cr and lf both return ASCII 10 (linefeed) and crlf return ASCII 10 and ASCII 13 together (linefeed and return). That's why your question confused me when I read it for the first time.

Apparently, you want Revolution to respond when you press the enter or return key. You can do this by trapping the enterKey, returnkey, enterInField or returnInField messages. The first two are sent if you press the enter respectively return key while no field is currently selected or focused. The latter two are sent if the text insertion point is in a field and enter respectively return is pressed.

You might want to read what the docs have to say about these messages.

Best,

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

Andycal
Posts: 144
Joined: Mon Apr 10, 2006 3:04 pm

Post by Andycal » Mon Jul 28, 2008 10:51 pm

Thanks for the headsup - I still get confused with all the built in stuff like 'enterKey' etc. It's a problem when I don't use RunRev all the time and only dip in now and then!

Post Reply