[comp.sys.amiga] ActivateGadget

slc@hoptoad.uucp (Steve Costa) (05/22/87)

How do you use ActivateGadget() ?

I have source to a program that doesn't use it, so that its requester
requires clicking. I've tried using ActivateGadget before and after
the request, with a Delay(5), but still nothing happens. Is using
ActivateGadget more complex than just inserting into already-running
code? If someone could point me to a simple example, it would be very
helpful.

carolyn@cbmvax.UUCP (05/27/87)

In article <2158@hoptoad.uucp> slc@hoptoad.UUCP (Steve Costa) writes:
>
>How do you use ActivateGadget() ?
>I have source to a program that doesn't use it, so that its requester
>requires clicking. I've tried using ActivateGadget before and after
>the request, with a Delay(5), but still nothing happens...

   ActivateGadget() will fail if the gadget is not ready to be activated.
You should ask for REQSET messages in your IDCMP and not do the
ActivateGadget() until your receive the REQSET message.

-- 
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
Carolyn Scheppner -- CBM   >>Amiga Technical Support<<
                     UUCP  ...{allegra,caip,ihnp4,seismo}!cbmvax!carolyn 
                     PHONE 215-431-9180
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=