Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!zaphod.mps.ohio-state.edu!usc!ucsd!ucbvax!LINUS.MITRE.ORG!jcf From: jcf@LINUS.MITRE.ORG Newsgroups: comp.windows.x.motif Subject: re: Text widget Message-ID: <9010040024.AA02456@binkley.mitre.org> Date: 4 Oct 90 00:24:39 GMT References: <2361@kiwi.mpr.ca> Sender: daemon@ucbvax.BERKELEY.EDU Distribution: inet Organization: The Internet Lines: 36 XmNmodifyVerifyCallback Philippe Jaccard write: I am trying to use a MOTIF text widget as a password entry field. This field must display a '*' or any other character for each user input. I was thinking of using the XmNmodifyVerify callback to maintain a copy of the text string. After having duplicate the insertion/deletion in my backup field, I was thinking of simply replacing callbackArg->text->ptr with '*'. It seems that the text provided in the callback datas is only a copy. The text widget don't use these datas to perform text modifications ! Does anybody knows more on this text widget behaviour ? I'll appreciate any suggestions. --- Maybe I'm taking you too literally but you definitely don't want to replace (as in assignment) callbackArg->text->ptr with '*'. Instead, try *callbackArg->text->ptr = '*'. This works with Motif 1.0.3. However, it may be an oversight because they go to the trouble of copying everything into the XmTextVerifyCallbackStruct and then modify XmText using all the original values except for the new string. A quick look at the 1.1.0 source indicates that this solution is upward compatible. In 1.1 you can change the other members of the XmTextVerifyCallbackStruct and have them take effect. In fact, in 1.1 it looks like you _can_ replace callbackArg->text->ptr (with a *char). Now if only I could find where in the OSF documentation that all this is intentional and will continue to be supported. -- Jim Fohlin (617) 271-7505 The MITRE Corporation, M/S A155 jcf@mitre.org Burlington Rd, Bedford, MA 01730 ...!linus!jcf