[ By Archive-name | By Author | By Category | By Newsgroup ]
[ Home | Latest Updates | Archive Stats | Search | Usenet References | Help ]

    Search the FAQ Archives

Single Page

Top Document: comp.windows.x.intrinsics Frequently Asked Questions (FAQ)
Previous Document: 25. How to debug an Xt application?
Next Document: 27. What is and how can I implement drag and drop?


26. Why don't XtAddInput(), XtAddTimeout() and XtAddWorkProc() work?


----------------------------------------------------------------------
   I have got a delicate problem with the three routines XtAddInput,
   XtAddTimeOut and XtAddWorkProc. The problem I have is that when
   I use them in my application they seem not to be registred properly.
   I have made a handy little testprogram where everything works
   perfect, but in my "real" application nothing happens. 

The introduction in R3 of the XtApp*() functions obsoleted those
routines (see Q19 for other changes in R3, R4, and R5).  What happens is
they use a default application context different then the one you may
have created.  Since events and timeouts are distributed on a per
application context basis and you are using two application contexts,
you won't get those events.

For example:

	...
	cnt = 0;
	toplevel = XtAppInitialize(&app, class,
				   Desc, XtNumber (Desc),
				   &argc, argv,
				   Fallback, args, cnt);

	XtAddTimeOut (...)
	XtAddWorkProc (...)

	XtAppMainLoop (app)

would never invoke the timeout.



Top Document: comp.windows.x.intrinsics Frequently Asked Questions (FAQ)
Previous Document: 25. How to debug an Xt application?
Next Document: 27. What is and how can I implement drag and drop?

Single Page


[ By Archive-name | By Author | By Category | By Newsgroup ]
[ Home | Latest Updates | Archive Stats | Search | Usenet References | Help ]


Send corrections/additions to the FAQ Maintainer:
ware@cis.ohio-state.edu

Last Update July 06 2008 @ 00:10 AM

© 2008 FAQS.ORG. All rights reserved.