[comp.sys.amiga.tech] Activate StringGadget in Requester

jdepp@deimos.ADS.COM (Joe Depp) (09/12/89)

I am having difficulty opening a StringGadget in a Requester which will allow
the user to type without first clicking the mouse.  I have set RELVERIFY
and ENDGADGET in the Gadget structure and I set SELECTED before I issue my
Request(&reqtr,window).  Everything works except that I must click the LMB
in the gadget window before I can type text to the window.

Can someone provide a little help?

jimm@amiga.UUCP (Jim Mackraz) (09/14/89)

In article <9085@zodiac.ADS.COM> jdepp@ADS.COM (Joe Depp) writes:
)I am having difficulty opening a StringGadget in a Requester which will allow
)the user to type without first clicking the mouse.  I have set RELVERIFY
)and ENDGADGET in the Gadget structure and I set SELECTED before I issue my
)Request(&reqtr,window).  Everything works except that I must click the LMB
)in the gadget window before I can type text to the window.
)
)Can someone provide a little help?

Sure.

Forget that SELECTED bit crap, and do the following:

After the Requester is put up (Request()), wait back on your
idcmp for the REQSET message (which means that Intuition has gotten
around to putting the requester all the way up and is happy with it).

At that point, call ActivateGadget( gadget, window, request );

Note: be sure you wait for REQSET.  Some people do a simple (stupid)
Delay(), which only works when the system is not bogged down or
doing something else (e.g., menus) that will defer the requester.

You might also want to get tricky and reactivate the gadget when
you get ACTIVEWINDOW while the requester is up.

	jimm
-- 
Jim Mackraz, I and I Computing	   	"... the signs are very ominous,
{cbmvax,well,oliveb}!amiga!jimm          and a chill wind blows."
							- Justice Blackmun
Opinions are my own.  Comments are not to be taken as Commodore official policy.