"on enterKey" not working

Kay C Lan lan.kc.macmail at gmail.com
Sun Oct 14 22:32:33 EDT 2007


On 10/15/07, Mark Swindell <mdswindell at cruzio.com> wrote:

Yet, "focus on this cd" in the image script states that the card is
> an invalid object.  How do you remove the focus from all objects on a
> card in one fell swoop, and give it to the card?  Could this be the
> problem?


Whilst 'focus on this cd" might be nice, that's really no different from:

click at "1,1"

as long as at position "1,1" has no control there.

As far as I can see, (and I've probably got it completely wrong) in Paul's
case, after he's finished with any object he wants the focus 'lost' so the
focus goes to the card so that when he presses Enter he can run a script in
a particular button. To me, why not just send the focus straight to that
button?

Rev is already set so that if there is a defaultButton on a card, and
nothing has the focus, pressing Enter or Return is like clicking on the
defaultButton. Which really means that with a card with a defaultButton,
clicking the card doesn't palace the focus on the card but really places it
on the defaultButton.

If a card has no defaultButton and you set it up so that when the card has
focus, pressing Enter or Return activates a particular button, then
shouldn't that button be the defaultButton? It would seem strange to me to
have a card full of buttons, none of which are 'throbbing blue' and yet
pressing Enter will activate one of them. In this case, everywhere you'd
have to have 'click at "1,1" or even focus on card (if that worked), you
could have focus on btn "theOneIWant".

Either I way, I'm sure there should be something here for Paul to get done
what he wants:-)



More information about the use-livecode mailing list