Path: utzoo!utgpu!jarvis.csri.toronto.edu!rutgers!iuvax!cica!gatech!ncsuvx!eceris!ml
From: ml@eceris.ncsu.edu
Newsgroups: comp.sys.amiga
Subject: Re: Stringadgets and ENDGADGET, how to use it?
Message-ID: <3658@ncsuvx.ncsu.edu>
Date: 14 Aug 89 18:10:03 GMT
References: <34@me.chalmers.se>
Reply-To: ml@eceris.UUCP ()
Lines: 31

In a previous article, clwa@me.chalmers.se wrote:

]  When reading the Intuition manual i got the impression that it would
]be possible to get a gadget to dissapear "automaticly" by using the
]ENDGADGET flag (in kombination with REQGADGET (or simmilar)). 

If the gadget is in a _requester_, and has ENDGADGET and REQGADGET set,
then when the user clicks on it the _requester_ will go away.  If your
gadget is not in a requester, ENDGADGET means nothing.

So, you need to create a requester structure; initialize it with a call
to InitRequester(), fill in appropriate fields, including a pointer to
your gadget(s) via the requester's ReqGadget field, and then display
your requester by calling Request().

Now, when the user clicks on any gadget with ENDGADGET set (and there may
be more than one in the requester), the requester will disappear.  You
can also make the requester go away by calling EndRequest(), but don't
need to in this case.

----------- minor advertisement: ---------
I've mailed a tutorial aid for programming gadgets on the Amiga off to
Bob Page (comp.sources.amiga), so whenever that gets posted you may find
it useful.  The source code (Lattice C V 5.02) runs about 137K.
It's heavily commented.  The executable is also useful since it displays
three sample gadgets and lets you modify parameters on the fly to see
what the effects are.  This was originally put together to teach programmers
at a local developers'/users' group about gadgets and how to program them.


             ==[ ml@eceris.ncsu.edu (128.109.135.109) ]==