[comp.sys.amiga.tech] ClearDMRequest, EndRequest

msl5864@ritcv.UUCP (Michael S. Leibow) (04/07/88)

Hi,

I am writing a program which lets the user open up windows on demand.  In
each window I set up a double menu requester so the user can change 
preferences on demand.

Situation:
	User brings up requester in window 1.
	User selects window two and brings up same requester.
	My program can't handle same requester in two windows.

Solution:
	After first requester appears (REQSET) do a ClearDMRequest
	on all windows.

	When I get a REQCLEAR, do a SetDMRequest on all windows.

Problem:
	ClearDMRequest has no effect.  I can still bring up the second
	requester and guru my program.  Without fixing my whole
	interface, is there a way to fix this?



-- 
Michael S. Leibow
UUCP:		{allegra,seismo}!rochester!ritcv!msl5864
CSNET:		msl5864%rit@csnet-relay.ARPA

cmcmanis@sun.uucp (Chuck McManis) (04/15/88)

In article <345@ritcv.UUCP> msl5864@ritcv.UUCP (Michael S. Leibow) writes:
>I am writing a program which lets the user open up windows on demand.  In
>each window I set up a double menu requester so the user can change 
>preferences on demand.
>
>Situation:
>	User brings up requester in window 1.
>	User selects window two and brings up same requester.
>	My program can't handle same requester in two windows.
>
>Solution:
>	After first requester appears (REQSET) do a ClearDMRequest
>	on all windows.
>
>	When I get a REQCLEAR, do a SetDMRequest on all windows.

Wrong solution :-). Why can't your program handle multiple people using the
requester? Is it because you can't tell who is giving you the clicks or
is it that the information is unique to each window and you are sharing the
requester data? If it is the former you can figure out which window sent
you the message with the window pointer in the intuition message. If it is
the latter you should make your requester 're-entrant'. Basically clone
all of the 'variables' in the requester. Each instance of the requester
can share pointers to borders, intuitext, and imagery. Note that the 
reason the ClearDMRRequests don't work is that Intuition sets a flag in
the requester (and links it into the windows requester list) when it
is "up" and the call to ClearDMRequest fails. It sounds like an interesting
problem to be sure!


-- 
--Chuck McManis
uucp: {anywhere}!sun!cmcmanis   BIX: cmcmanis  ARPAnet: cmcmanis@sun.com
These opinions are my own and no one elses. But you knew that, didn't you.