The default button

Mark Wieder ahsoftware at sonic.net
Fri Feb 24 19:32:40 EST 2017


On 02/24/2017 03:13 PM, Bob Sneidar via use-livecode wrote:
> Hi all.
>
> I was given to understand that there can only be one default button. I see I am mistaken. I thought that setting the defaultButton of a card unset the default of the button that was the defaultButton prior to that. It seems to me that this is how this ought to work, because if not, then the return key will yield unpredictable results.
>
> What this DOES do is on a standard button it changes the appearance to, for example on OS X, a blue button instead of a whitish one. Is this all this is for? It cannot be as hitting the return key WILL send a mouseUp to whatever the engine thinks is the current defaultButton.

You *can* indeed have more than one default button, but it's not a good 
idea. For the reasons you mentioned and more. On OSX having more than 
one default button will use up huge amounts of cpu power even while 
doing nothing more than sitting around and looking good.

PowerTools will warn you if you try to add more than one default button, 
but once you've been warned won't prevent it, because by that point you 
obviously mean to do what you're about to do.

-- 
  Mark Wieder
  ahsoftware at gmail.com






More information about the use-livecode mailing list