[comp.windows.x] Two XView questions

ogden@nmsu.edu (Bill Ogden) (07/19/90)

1. How do i prevent my application from displaying the Quit
Confirmation.. "Text has been editied..." (and why doesn't
the default include a save and quit option)?

2. How do I position the pointer to the default option in
a notice prompt? 

Bill Ogden (ogden@nmsu.edu)

chuck@trantor.harris-atd.com (Chuck Musciano) (07/20/90)

In article <OGDEN.90Jul19093331@aigyptos.nmsu.edu>, ogden@nmsu.edu (Bill Ogden) writes:
> 1. How do i prevent my application from displaying the Quit
> Confirmation.. "Text has been editied..." (and why doesn't
> the default include a save and quit option)?

     You need to do a textsw_reset(text_window) before you exit the window
system.  The easiest way is to attach a FRAME_DONE_PROC to your base frame,
and have it reset all of your text windows.  You'll only get this message
if there are unsaved edits in the text window.

> 2. How do I position the pointer to the default option in
> a notice prompt? 

     If your users have cursor warping enabled, it should happen automatically
if you are using the notice package.  A typical notice looks like:

	result = notice_prompt(base_frame, NULL,
		    NOTICE_MESSAGE_STRINGS, "If you continue, you will destroy",
		    			    "your workstation and be forced to",
		    			    "use a PC running Windows 3.0",
		    			    " ",
		    			    "Is this acceptable?",
		    			    NULL,
		    NOTICE_BUTTON_YES, "Sure, what the hell",
		    NOTICE_BUTTON_NO,  "Cripes!  No way!"
		 NULL);

     The cursor will warp to the NOTICE_BUTTON_YES button.  If you use the
NOTICE_BUTTON attributes instead, there is no default button and no warping.

Chuck Musciano				ARPA  : chuck@trantor.harris-atd.com
Harris Corporation 			Usenet: ...!uunet!x102a!trantor!chuck
PO Box 37, MS 3A/1912			AT&T  : (407) 727-6131
Melbourne, FL 32902			FAX   : (407) 729-2537

I'm glad you asked, son.  Being popular
	is the most important thing in the world.	-- Homer Simpson