Xref: utzoo comp.windows.x:28654 comp.windows.x.motif:1003 Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sun-barr!ccut!wnoc-tyo-news!ricohgwy!patty!snoopy!ohayon From: ohayon@snoopy.src.ricoh.co.jp (Ohayon Tsiel) Newsgroups: comp.windows.x,comp.windows.x.motif Subject: Re: XmLabel "Redisplay" Problem Keywords: XmLabel Message-ID: <3496@snoopy.src.ricoh.co.jp> Date: 23 Oct 90 23:38:16 GMT References: <3492@snoopy.src.ricoh.co.jp> Reply-To: ohayon@snoopy.src.ricoh.JUNET (Ohayon Tsiel) Organization: Ricoh Software Research Center, Tokyo Lines: 30 Hi out there. I traced the XmLabel redisplay problem and found out that my program was crashing when I was doing : XtSetArg(arg[0], XmNlabelString, xmstr); XtSetValues(labelWidget, arg, 1); For some reason it was crashing when _XmStringFree was called in the Label SetValues procedure. So this is how I got around it, although I shouldn't be doing this, especially line 1: XmLabelWidgetClass superclass = (XmLabelWidgetClass)xmLabelWidgetClass; Widget labelWidget; XmString xmstr; ... stuff deleted 1: ((XmLabelWidget)labelWidget)->label._label = _XmStringCreate(xmstr); 2: XClearWindow(XtDisplay(labelWidget),XtWindow(labelWidget),0,0, (int)XtWidth(labelWidget),(int)XtHeight(labelWidget)); 3: (*superclass->core_class.expose)(labelWidget); 4: XmStringFree(xmstr); The program doesn't break anymore ! Does anybody know why ? T. Ohayon