[comp.sys.apollo] Dialog: Help? Task/Event Ordering.

ashley@cheops.eecs.unsw.oz (Ashley M. Aitken) (03/01/90)

Howdy,

Simple problem (which I am finding frustratingly difficult) with Dialog.

I have an icon in a popup (which pops up over a GMR display area). I want the
icon to cause a change_view routine (associated with the change_view_task) to
be called, BUT only after the popup has popped down. At present the task is 
associated with the icon and, no matter how I try, I cannot make the routine 
be called after the popdown.

I have tryed various combinations of popdown, selecting this and that, and even
a dummy icon which gets selected after the popdown event and would have the 
task associated with it (but it appears not to be active).

The reason I need to do this is because (I am too lazy and) the GMR display
area gets changed and saved before the popup pops down, taking with it the 
image of the popdown.  I should probably do my saving and drawing more aptly 
ut it seems a simple way out to pop the popup down first.

Similar things happen with menus which change the view too.

Any hints would be most gratefully received on e-mail to the address given 
below.

Thanks In Advance,
Ashley Aitken.
 
P.S. What do people think of Dialog? 

	I find it quite powerful, but would give anything for an interactive 
	construction tool for the interface design ie click here for an icon.

P.S. How hard is it to change from Dialog to NewDlg (the X Object Oriented
Dialog)? 


Here is some relevant (to my problem) dialog code!

(*
**	Change View Tasks
*)

	change_view_t	:=	NULL:
		COMP	=>	<CALL change_view>;
		END

	change_scale_t	:=	REAL:
		VALUE	=	50.0;
		END

	change_xoff_t	:=	INT:
		VALUE	=	0;
		END

	change_yoff_t	:=	INT:  
		VALUE	=	0;
		END
   



(*
**	CHANGE VIEW INTERFACE
*)

	change_view_i	:=	ICON_A:
		STRING	=	"VIEW";
		SELECT	=>	< change_view_popup_i SHOW>;
		END                             

(*            
	change_view_op_i:=	ICON:
		STRING	=	"NOT DISPLAYED";
		TASK	= 	change_view_t;
		END
*)

	change_ok_i		:=	ICON_A:
		STRING	=	"OK";    
		SELECT	=>	<change_view_popup_i POPDOWN;>;
		TASK	=	change_view_t;      
		[M1]	=>	<>;
		[M1U]	=>	<* SELECT>;
		END
           
	change_cancel_i		:=	ICON_A:
		STRING	=	"CANCEL";
		SELECT	=>	<change_view_popup_i POPDOWN>;
		END
           
	change_xoff_i	:=	INT_FIELD_A:
		TASK	=	change_xoff_t;
		PROMPT	= 	"X : "; 
		END

	change_yoff_i	:=	INT_FIELD_A:
		TASK	=	change_yoff_t;
		PROMPT	=	"Y : "; 
		END

	change_scale_i	:=	REAL_FIELD_A:
		TASK	=	change_scale_t;
		PROMPT	=	"Scale : ";
		END 
                           
	change_decision_s	:=	ROW_A:
		CONTENTS	=	(
						change_cancel_i
						change_ok_i
						); 
		DIVISION_WIDTH	=	5;
		BORDER_WIDTH 	=	5;
		END

	change_view_s	:=	COLUMN_A:
		CONTENTS	=	(
						change_xoff_i
						change_yoff_i
						change_scale_i 
						change_decision_s
						);   
		COLOR_SET	=	off;
		SHAPE		=	rounded;
		OUTLINE			=	ON;  
		DIVISION_WIDTH	=	5;
		BORDER_WIDTH	=	5;
		END     

 	change_view_popup_i	:=	POPUP_A:
		CONTENTS	=	change_view_s; 
		LEAVE	=>	<change_view_popup_i POPDOWN>;
		END
              


E-MAIL  ashley@cheops.eecs.unsw.oz				   ACSnet
	ashley%cheops.eecs.unsw.oz@uunet.uu.net			   ARPAnet
	ashley@cheops.eecs.unsw.oz.au				   ARPAnet
	{uunet,ukc,ubc-vision,mcvax}!munnari!cheops.eecs.unsw.oz!ashley UUCP	
	ashley%cheops.eecs.unsw.oz@australia			   CSnet
	ashley%cheops.eecs.unsw.oz@uk.ac.ukc			   JAnet

POSTAL	Academic Address:			Residential Address:
	Computer Science Department, EECS,	c/o Basser College,
	University of New South Wales,		The Kensington Colleges,
	Box 1,PO KENSINGTON,N.S.W.,2033,	Box 24,PO KENSINGTON,3033.
	AUSTRALIA.				AUSTRALIA.
	Ph. (02) 697-4055 Fx. (02) 662-2087	Ph. Aust (02) 663-8117