Default Button

dunbarx at aol.com dunbarx at aol.com
Thu Sep 1 13:45:36 EDT 2011


Mark.


Try this:


Create a new stack, drag an editable field and a defaultButton over.


Put this in the button script:



on mouseUp
   beep 3
end mouseUp



Press return, get three beeps. Now place a cursor in the field. Hit return, no beeps, as is proper.
Now click anywhere in the card area, deselecting the field. Hit return. No beeps
Now click the button. Three beeps.
Now hit return. Three beeps


Are there two levels of "no active control"?


AHA.


Just tried this all over again, and no beeps of any kind at all, no matter what I do, unless, of course, I click the actual button itself.


OXS 10.4.11 LC 4.5.3


Craig





-----Original Message-----
From: Mark Schonewille <m.schonewille at economy-x-talk.com>
To: How to use LiveCode <use-livecode at lists.runrev.com>
Sent: Thu, Sep 1, 2011 8:29 am
Subject: Re: Default Button


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