Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!samsung!uunet!aspect!jeff From: jeff@aspect.UUCP (Jeff Rosler) Newsgroups: comp.windows.x.motif Subject: Re: XmPushButton translations Message-ID: <3351@aspect.UUCP> Date: 30 Jul 90 17:48:26 GMT Organization: Aspect Telecommunications, San Jose, Ca Lines: 44 > > > > [Sparc 1+, SunOS 4.1, ICS Motif 1.0, X11R4 server] > > > > I'm having trouble specifying translations for the XmPushButton widget. > > If I specify them as #augment or #override, they instead seem to #replace > > the PushButtons default translations. Here's a simple example > > ... > > Has anyone else seen this or am I doing something wrong? > > > This was a bug, it's fixed in 1.1. > >It's not a bug, it's a feature :-). Unfortunately, I think this feature is >still in 1.1. The problem is that the PushButton is schizophrenic. It has >a different translation personality depending on it's context (whether it's >in a pulldown or popup menu or not). This information can only be >ascertained in the initialize routine (as currently structured) and is >unavailable at the time that the resource list is processed. What motif >does is to leave the translations null and set them in the initialize >routine. If the translations have been set by the client and/or user then >the code assumes that a complete table will be provided. How is this a feature? Why is it the case that a widget doesn't want to override its translations if it's superclass or the client has specified some other translations. What is wrong with using XtOverrideTranslations() or XtAugmentTranslations() to set the translations in the Initialize method? This "feature" is used in many Motif widget classes (not just PushButton). Is there some reason why? Different translation tables can still be added with the appropriate Intrinsics routine. It is not necessary to set the translation manager translations directly or not set them if some translations have alreadly been specified. Is there some underlying assumption I am missing that mandates this behavior? Jeff Rosler Aspect Telecommunications 1730 Fox Drive San Jose, CA 95131-2312 uunet!aspect!jeff (408) 441-2420