[Search for users] [Overall Top Noters] [List of all Conferences] [Download this site]

Conference bulova::decw_jan-89_to_nov-90

Title:DECWINDOWS 26-JAN-89 to 29-NOV-90
Notice:See 1639.0 for VMS V5.3 kit; 2043.0 for 5.4 IFT kit
Moderator:STAR::VATNE
Created:Mon Oct 30 1989
Last Modified:Mon Dec 31 1990
Last Successful Update:Fri Jun 06 1997
Number of topics:3726
Total number of notes:19516

903.0. "Xlib/Xtoolitk event handling..." by AVIATE::SHAH (Yanks in '89) Thu Jun 08 1989 08:58


	I read somewhere, maybe in the DECwindows Architectural Overview,
	that using Xlib event handling routines and the toolkit event
	handling routines within the same application is not recommended.
	Is there a technical reason why this is so?  I'm not sure if I
	read the Architectural Overview correctly, but I believe it did
	say something like this.......



	Thanks,
	-Pratish

T.RTitleUserPersonal
Name
DateLines
903.1maybeSTAR::BRANDENBERGSi vis pacem para bellumThu Jun 08 1989 09:2511
    
    I imagine this warning is more an indication of a need to cooperate. 
    You shouldn't use xlib routines to remove events from the event queue
    destined for toolkit objects.  A "while (XPending(dpy))
    XNextEvent(dpy, &event);" loop in a callback routine wouldn't be very
    clever.  Intelligent use of the "if" and "check" event processing
    routines is reasonable.  Just remember that there's a lot of rope with
    which to hang yourself.
    
    						m

903.2Widgets need events too...GSRC::WESTI'm just visiting this planet.Thu Jun 08 1989 15:0411
  When ever you are using the Toolkit care must be taken when using Xlib.
  Xlib should be used whenever the Toolkit can't do what you want.

  You should use XtNextEvent and XtDispatchEvent so that the widgets can do
their work.  You also will have the event to do whatever it is that you wish
(within reason).

					-=> Jim <=-