How to avoid focus on nothing

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

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller, robinmiller

Post Reply
simon.schvartzman
Posts: 638
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

How to avoid focus on nothing

Post by simon.schvartzman » Tue May 04, 2021 6:45 pm

Hi all, I have one card with one input field and two buttons and my goal is not letting the user to focus "on nothing" by clicking on the card.

Just to make myself clear the UX expects the focus to be always on the input field (waiting for a barcode to be scanned) until the user clicks on one of the two buttons to go to another card.

Ideas/suggestions are veeeery muuuuch welcomed

Thanks
Simon
________________________________________
To ";" or not to ";" that is the question

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

Re: How to avoid focus on nothing

Post by Klaus » Tue May 04, 2021 6:52 pm

Hi Simon,

why not put a little "mouseup" handler in the card script,
which always puts the focus to your namely field?

Code: Select all

on mouseup
  focus on fld "your field here..."
ebnd mouseup
Best

Klaus

simon.schvartzman
Posts: 638
Joined: Tue Jul 29, 2014 12:52 am
Location: Brazil

Re: How to avoid focus on nothing

Post by simon.schvartzman » Tue May 04, 2021 6:57 pm

Klauss, this is a perfect example of the secular KISS (keep it simple stupid) philosophy developed by Socrates or Platon (I don't really recall whom...)

Many thanks that will work for me!

Best
Simon
________________________________________
To ";" or not to ";" that is the question

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

Re: How to avoid focus on nothing

Post by Klaus » Tue May 04, 2021 7:00 pm

It is KLAUS, just one S. :D

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: How to avoid focus on nothing

Post by bogs » Tue May 04, 2021 10:28 pm

Klaus wrote:
Tue May 04, 2021 7:00 pm
It is KLAUS, just one S. :D
Until it is "Klausimus", then there are 2 s'es, but they are separated by an imu :twisted:
Image

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

Re: How to avoid focus on nothing

Post by Klaus » Tue May 04, 2021 11:00 pm

bogs wrote:
Tue May 04, 2021 10:28 pm
Klaus wrote:
Tue May 04, 2021 7:00 pm
It is KLAUS, just one S. :D
Until it is "Klausimus", then there are 2 s'es, but they are separated by an imu :twisted:
"klausimus", you must be kiddin', 8) I'm taking this personal!

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

Re: How to avoid focus on nothing

Post by SparkOut » Wed May 05, 2021 7:31 am

Nobody ever calls Klausimausi by the name "Klausimus" though. Not unless they want to be butted with the head that can knock down walls.

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

Re: How to avoid focus on nothing

Post by Klaus » Wed May 05, 2021 8:30 am

SparkOut wrote:
Wed May 05, 2021 7:31 am
Nobody ever calls Klausimausi by the name "Klausimus" though. Not unless they want to be butted with the head that can knock down walls.
EX-ACTLY!
Thank you!

bogs
Posts: 5435
Joined: Sat Feb 25, 2017 10:45 pm

Re: How to avoid focus on nothing

Post by bogs » Wed May 05, 2021 9:58 am

SparkOut wrote:
Wed May 05, 2021 7:31 am
Nobody ever calls Klausimausi by the name "Klausimus" though. Not unless they want to be butted with the head that can knock down walls.
I thought everyone knew, I am a nobody from way way back :twisted:
Image

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

Re: How to avoid focus on nothing

Post by Klaus » Wed May 05, 2021 10:50 am

Excuses, excuses, excuses... 8)

Post Reply

Return to “Talking LiveCode”