Reaction String Gadget wmh_Code field

Have a question about our Software Developer Kit? Ask them here.

Reaction String Gadget wmh_Code field

Postby tbreeden » Thu May 16, 2013 4:21 pm

I'd like to be able to detect whether a Reaction String Gadget was exited by a TAB entry
or an ENTER entry , (or a gadget deactivation).

The string_gc Autodocs (53.20) don't specifically address the code field after WMHI_HANDLEINPUT,
but it seems that Reaction extends Intuition here by returning wmh_Code of 0 for ENTER
and 9 for TAB.

This behavior is what is documented for GadTools, so it seems reliable for Reaction. But
it should be documented.

Also, the Reaction STRINGA_RelVerifySpecial attribute can be used to get a GadgetUp
on gadget deactivation. Experimenting seems to show that wmh_Code comes back
as 10 in this case. Is that reliable?

Thanks,

Tom
User avatar
tbreeden
 
Posts: 160
Joined: Sat Jun 18, 2011 1:57 am
Location: Charlottesville, VA, USA

Re: Reaction String Gadget wmh_Code field

Postby ssolie » Thu May 16, 2013 4:41 pm

I have found the best and most reliable way to interact with a string gadget is via an editing hook.

If you are messing with special keys and such that is really the best way to control things.
ExecSG Team Lead
User avatar
ssolie
Beta Tester
Beta Tester
 
Posts: 1010
Joined: Mon Dec 20, 2010 9:51 pm
Location: Canada

Re: Reaction String Gadget wmh_Code field

Postby tbreeden » Sat May 18, 2013 4:51 pm

Thanks. I'll go in the direction of a string gad hook.

Still, it would be useful to have a systematic list of the uses or
non-uses of whm_Code in Reaction.

Tom
User avatar
tbreeden
 
Posts: 160
Joined: Sat Jun 18, 2011 1:57 am
Location: Charlottesville, VA, USA


Return to SDK Support

Who is online

Users browsing this forum: No registered users and 2 guests