Populating fields with text

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

Post Reply
gcamina
Posts: 10
Joined: Tue Mar 30, 2010 11:36 pm

Populating fields with text

Post by gcamina » Thu Nov 29, 2012 5:43 pm

Hi everyone,

I know how to populate fields with text at the click of a button when there is only one field on a card.

Code: Select all

on mouseUp
   put "mytext" after field "myfield"
end mouseUp
But how can you choose which field must be populated when you have more than one on the same card?

Thanks in advance,

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

Re: Populating fields with text

Post by Klaus » Thu Nov 29, 2012 5:54 pm

Hi gcamina,

well, YOU as the developer should know this! 8)

Or do you want the user decide where to add text with a "mouseclick"?
This would require a nice and intuitive UI (user interface).
To be honest, I have never seen such an UI in an app.

Why not let the user add the text himself by typing into the field?
Or do the fields have to be locked?

Ah, and welcome to the forum! :D


Best

Klaus

gcamina
Posts: 10
Joined: Tue Mar 30, 2010 11:36 pm

Re: Populating fields with text

Post by gcamina » Thu Nov 29, 2012 6:04 pm

Thanks Klaus,

But it's not thaaaaat easy :) See, my students need to input Spanish words using an English keyboard, which is not always the best thing, so, nice as I am :P I've created a keyboard with special characters. You know, those annoying accented vowels, plus "ñ" and the opening question and exclamation marks of Spanish, all of it in lower and upper cases. The keyboard floats beautifully over all the fields they need to populate but I don't know how to "write" on the right/focused field when clicking one of the buttons.

Any help?

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

Re: Populating fields with text

Post by Klaus » Thu Nov 29, 2012 6:16 pm

Hi gcamina (g-shirt? :D )

maybe you could use "the selectedfield"?
...
put "whatever" after the selectedfield
...

Best

Klaus

gcamina
Posts: 10
Joined: Tue Mar 30, 2010 11:36 pm

Re: Populating fields with text

Post by gcamina » Thu Nov 29, 2012 6:23 pm

Just that???

Oh jeez, this LiveCode can be frustrating at times!!! I've tried all kinds of stupid possibilities before asking for help. Grrr. I´ll use that then, thanx again.

Oh, I guess you mean "camisa" for shirt :D

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

Re: Populating fields with text

Post by Klaus » Thu Nov 29, 2012 6:31 pm

Hi gcamina,
gcamina wrote:Just that???
Yes, don't shoot the messenger! 8)

Check these stacks to get more "aha" effects:
http://www.runrev.com/developers/lesson ... nferences/
gcamina wrote:Oh, I guess you mean "camisa" for shirt
Ouch, yes, sure :oops:


Best

Klaus

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

Re: Populating fields with text

Post by dunbarx » Thu Nov 29, 2012 11:31 pm

Hi.

It is always a good thing when you find that the answer is so simple, native, and obvious. The beauty of LiveCode.

And it is true that there are a lot of words to learn.

Craig Newman

gcamina
Posts: 10
Joined: Tue Mar 30, 2010 11:36 pm

Re: Populating fields with text

Post by gcamina » Sat Dec 01, 2012 1:26 pm

Needless to say that the solution proposed by Klaus worked smoothly at the first attempt :oops:

As a self-imposed punishment I'm doing extra homework with the conferences and the dictionary, so I won't embarrass myself with waaaay too basic questions anymore -- I will, no doubt about that :)

The quality of the small but useful apps I'm creating with my almost non-existing scripting ability is simply outstanding. I'm becoming addicted to LC!!

Thanks for all the help and the prompt replies.

Gonzalo

Post Reply