Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!usc!zaphod.mps.ohio-state.edu!van-bc!ubc-cs!uw-beaver!uw-june!wolf.cs.washington.edu!slh From: slh@wolf.cs.washington.edu (Scott Heyano) Newsgroups: comp.windows.x.motif Subject: Re: Motif 1.0 XmText problem Keywords: XmText, marginHeight resource Message-ID: <13830@june.cs.washington.edu> Date: 22 Nov 90 00:16:16 GMT References: <1990Nov20.204225.23831@sctc.com> Sender: news@cs.washington.edu Reply-To: slh@wolf.cs.washington.edu (Scott Heyano) Distribution: comp.window.x.motif Organization: Computer Science & Engineering, U. of Washington, Seattle Lines: 47 In article <1990Nov20.204225.23831@sctc.com> pasturel@sctc.com (Pierre Pasturel) writes: |I am getting the following X toolkit warning: | |X Toolkit Warning: | Name: text5 | Class: XmText | Invalid margin height, must be >= 0. | |after the following piece of code has been executed several times in |a loop: | |XtSetArg (args[0], XmNvalue, temp_holder_two); |XtSetValues( LOCKtoTPT_Text, args, 1); | |where temp_holder_two is an array of 71 characters which never contains |newlines (if that makes a difference), only reg. alpha-numeric characters and |an occassional ^M (carriage return character) | |and where LOCKtoTPT_Text is an XmText widget created as follows: | | n = 0; | XtSetArg (args[n], XmNcolumns, 70 ); n++; | XtSetArg (args[n], XmNmarginHeight, 3 ); n++; /* default */ | XtSetArg (args[n], XmNeditMode, XmSINGLE_LINE_EDIT); n++; | XtSetArg (args[n], XmNeditable, FALSE); n++; | XtSetArg (args[n], XmNcursorPositionVisible, False); n++; | XtSetArg (args[n], XmNfontList, fontlist6x12); n++; | LOCKtoTPT_Text = XmCreateText (line, "text5", args, n); | [stuff] | | and so on...., starting at 15 (why?) and always increasing by 8. | |The value probably eventually execeeded 2^^16 (the resource's type is a |short int) and at which point I get the X toolkit warnings, which slow |my application down and fills up my xterm from which I started the |application. | [more stuff] If in part what you are asking (which I doubt) is "Why do I get the toolkit error." that's because the marginHeight value is rolling over into the negative domain. Why the marginHeight value is getting changed, I don't know, but you might try not putting in the ^M, they might be screwing up the single-line-edit mode.