Default Button

Pete pete at mollysrevenge.com
Thu Sep 1 13:09:01 EDT 2011


Thanks everyone.

Jacque, Like you I'm currently using a returnKey handler for the card that
sends mouseUp to the button to get round this.

Craig, If I "put the defaultbutton of this card", I get the correct output.
 Also, I'm not seeing anything in the dictionary about the button changing
size - is that in the defaultButton entry?

Mark, maybe the difference between what you did and what I have is that I
have 3 field controls on the card in addition to the default Button.  Each
of the field controls has lockText set to true and traversalOn set to false.
 Thing is, the dictionary says the default button behavior only works if
there is no active control on the card, but it doesn't define what an active
control is so I don't know if the way I defined the field controls qualifies
them as being inactive or not.

I'm getting the behavior I want by using the card level returnKey handler
but wondering whether I should enter a bug report about this. There doesn't
seem any point in defining a button as the default button unless it acts as
defined in the dictionary, but it would be good to know what qualifies as an
"active control" before reporting it as a bug.

Pete
Molly's Revenge <http://www.mollysrevenge.com>




On Thu, Sep 1, 2011 at 9:27 AM, Mark Schonewille <
m.schonewille at economy-x-talk.com> wrote:

> Hi,
>
> This is what I just did:
>
> 1) create new stack
> 2) drag one default button from the tools palette into your stack
> 3) edit the script of the button to make it been on mouseUp (and nothing
> else)
> 4) compile and close script
> 5) press return
> 6) hear beep
>
> --
> Best regards,
>
> Mark Schonewille
>
> Economy-x-Talk Consulting and Software Engineering
> Homepage: http://economy-x-talk.com
> Twitter: http://twitter.com/xtalkprogrammer
> KvK: 50277553
>
> Send me a friend request on Facebook if you like
> https://www.facebook.com/marksch
>
> On 1 sep 2011, at 17:20, J. Landman Gay wrote:
>
> > On 8/31/11 7:29 PM, Pete wrote:
> >> I put a default button a card that has a couple of field controls on it.
> >>  The field controls all have lockText set to true and traversalOn set to
> >> false.  Pressing the return key when the card is active does not execute
> the
> >> mouseUp handler for the default button as claimed by the dictionary.  Is
> >> there some other setting of the card/button/controls that I have to use?
> >
> > Funny, I never knew about this capability. I've always had to script it
> with a returnKey handler in the card, I've never seen a default behavior.
>
>
> _______________________________________________
> use-livecode mailing list
> use-livecode at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
> http://lists.runrev.com/mailman/listinfo/use-livecode
>
>



More information about the use-livecode mailing list