clwa@me.chalmers.se (08/14/89)
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)). I think i saw the same thing i Rob Peck's(?) book (the name slips my mind). I have been trying this with a string gadget (a sort of file requester) but i have not succeded. I get the GADGETUP signal (GADGETDOWN and what ever i try), the dobuffer is ok but it's still there. Have i misinterpreted the information or/and am i doing something wrong. I have a strange problem when using Lattice C 5.02. LC1 will not compile a source named edit.c (the same thing happends with test.c). When i rename it to, for example, ed.c everything is OK! strange... I have some vague recollection of hearing this before.... Have you seen it? Claes Walther CLWA@Gamma.Me.Chalmers.Se Chalmers University of Technology G|teborg Sweden ***** We don't do disclaimers in Sweden, we only spell wrong *****
ml@eceris.ncsu.edu (08/15/89)
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) ]==
shf@well.UUCP (Stuart H. Ferguson) (08/16/89)
+-- clwa@me.chalmers.se writes: | 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)). [ ... ] | I have been trying this with a string gadget (a sort of file requester) | but i have not succeded. [ ... ] You have a slight misunderstanding there. REQGADGET is a flag used to indicate that a Gadget is part of a Requester (see "Requesters and Alerts," Chapter 7, Intuition Reference Manual). If a Gadget is part of a Requester, and the ENDGADGET flag is set, then the Requester will automatically go away when the user completes a transaction with the gadget. How this works exactly with string gadgets I'm not sure, but the "Ok" and "Cancel" gadgets on most Requesters are flagged with ENDGADGET. -- Stuart Ferguson (shf@well.UUCP) Action by HAVOC (ferguson@metaphor.com)