Changing the Default Button
revdan at danshafer.com
Mon Sep 26 16:47:36 CDT 2005
Makes sense, BUT.... Setting the default of a button in the property
inspector in the IDE works in such a way that it does indeed activate
that button's mouseUp script on return/enter without any scripting on
our part. So the question is why when he changes the default button
from button A to button B in a script, does not hitting Return/Enter
activate Button B's default mouseUp handler. Should work as far as I
can tell. Clearly doesn't.
On Sep 26, 2005, at 2:32 PM, Sarah Reichelt wrote:
> On 9/27/05, Dan Shafer <revdan at danshafer.com> wrote:
>> I have a client who writes his own Rev code. He wants to change the
>> Default button on a card as he goes from it to another card and then
>> comes back.
>> The UI updates correctly. The button says it's the default in the
>> prop inspector. But hitting Return or Enter at that card does not
>> activate the handler of the default button as it does for the default
>> button in the original setup.
>> What does he need to do that we're missing?
> As far as I know, creating a default button only changes it's
> appearance. It does not allocate any behavior to that button (although
> I think it is supposed to). Your client needs to have an enterKey
> handler and a returnKey handler and have them check which button is
> set to default (use the defaultButton property) and activate it
> If the default button can be activated while typing in a field, you
> will need enterInField and returnInField handlers as well.
> use-revolution mailing list
> use-revolution at lists.runrev.com
> Please visit this url to subscribe, unsubscribe and manage your
> subscription preferences:
Dan Shafer, Information Product Consultant and Author
Get my book, "Revolution: Software at the Speed of Thought"
More information about the use-livecode