[comp.windows.x] default application context

pds@quintus.UUCP (Peter Schachte) (07/29/89)

A little while back, someone pointed out here that in order for
widget-specific converters to be available to an application, that
application must use the default application context.  The only
documented way I can see to FIND the default application context is to
call XtInitialize(), call XtWidgetToApplicationContext() on the
resulting widget, and then destroy the widget.  The person pointed out
that there is an undocumented function (_DefaultAppContext(), or
something like that) that would return the default app context.

Will R4 make widget-specific converters visible from all app contexts?

Will R4 provide a documented way to get the default app context?

Will my convoluted but documented sequence for finding the default app
context work properly?  Is there any better solution for the moment?

Thanks in advance for any help.


-- 
-Peter Schachte
pds@quintus.uucp
...!sun!quintus!pds

kit@EXPO.LCS.MIT.EDU (Chris D. Peterson) (07/31/89)

> A little while back, someone pointed out here that in order for
> widget-specific converters to be available to an application, that
> application must use the default application context. 

This is fixed in public patch number 9.  Widget converters are now
avaliable to ALL application contexts.


> Will R4 make widget-specific converters visible from all app contexts?

Yep.

> Will R4 provide a documented way to get the default app context?

In R4 we are de-emphasizing the use of the default application context.  It
is only provided to maintain some compatability with pre R3 toolkit
implementations.

> Will my convoluted but documented sequence for finding the default app
> context work properly?  Is there any better solution for the moment?

Calling XtInitialize() more that once in any application is a bad idea.  What
I suggest to people is to do exactly what you have done.  Although I see no
reason to destroy the shell widget returned from XtInitialize(). 


						Chris D. Peterson     
						MIT X Consortium 

Net:	 kit@expo.lcs.mit.edu
Phone:   (617) 253 - 9608	
Address: MIT - Room NE43-213


t