Path: utzoo!utgpu!news-server.csri.toronto.edu!cs.utexas.edu!sdd.hp.com!caen!news From: amber@engin.umich.edu (Lee Liming) Newsgroups: comp.windows.x.motif Subject: OSF 1.1.2 XmStringLtoRCreate() Message-ID: <6JC-!J=@engin.umich.edu> Date: 14 Jun 91 03:04:27 GMT Organization: University of Michigan (CAEN) Lines: 29 We've recently upgraded our OSF/Motif from 1.1.1 to 1.1.2. One of the bug fixes listed for this version is "pir 2652", which supposedly fixes a problem with "extra" segments with zero-length text ("") being added to compound strings created using the XmStringLtoRCreate() function. After recompiling a home-brew application with the new version, I discovered that the new XmStringLtoRCreate() will consider ANY zero-length text segment to be "extra", including those embedded between non-zero-length segments in the argument passed to it. It consequently throws them all away. Our revision 1.1 OSF/Motif Programmer's Guide says nothing about this function dropping empty text segments from the compound strings it creates. The ability to have zero-length segments was useful for creating blank lines in the text displayed in XmLabel widgets, for example, perhaps in cases where you don't know at compile-time what text will be displayed. Was this really the intention behind this bug fix, or was it overkill? Is there something obvious (or a "greater purpose") that I'm overlooking? Maybe compound strings weren't meant to be used this way? For now, I'm bypassing this "feature" by simply replacing zero-length segments with segments containing a space. It seems like this is a hack, though, and shouldn't be necessary. What's wrong with zero-length segments in compound strings? -- ------------------------------------------------------------------------------- Lee Liming Computer Aided Engineering Network The University of Michigan