> It's a heck of a lot easier to use FrmCopyTitle; why bother with 
>> FrmSetTitle? All you need to do is to make sure the initial title (stored 
>> in the resource) is as long as you ever want it to be (just pad with 
>> spaces), and that you never copy in a title that's longer (so 
>> myNewTitle[maxLength-1]='\0'; or the like). The real advantage of 
>> FrmCopyTitle is that it makes a copy of your string, so you don't need to 
>> preserve it, while FrmSetTitle requires that your string is always 
>> available (e.g., global variable or the like).
>
>You're missing the point here. The problem is not about preferring
>FrmCopyTitle over FrmSetTitle. Both behave the same way dealing with
>redraws after the change. The old title is not erased and only the text
>part of the new title (without the rounded border) is drawn after the
>change. This is kind of documented in the new OS 3.5 Reference about
>FrmSetTitle (without mentioning the problems of longer titles and their
>border). The docs for FrmCopyTitle doesn't mention any problem at all. And
>the work around given in the docs (to use FrmHideObject and FrmShowObject)
>doesn't work (at least for me).

It took me a couple days to check out what I thought was the case, but in 
one of our apps (our "On Hand" inventory app) we respond to certain scan 
events of the SPT1500 scanner by doing a simple FrmCopyTitle. I can scan 
a 4-letter title and then a 2-letter title and the new title appears 
properly just fine, no need to erase anything. The SPT1500 runs 3.0, but 
I have verified in POSE running 3.5 where I can enter the new title "by 
hand" and it still changes just fine. Presumably one of us is missing 
something.

Steve Patt
President, Stevens Creek Software
  http://www.stevenscreek.com/palm
  Best PQA ("ePQA"), PalmSource 99
  Best Application ("PizzaScan"), Palm Developer's Conference 1998
  First printing software for the Palm - September, 1997


-- 
For information on using the Palm Developer Forums, or to unsubscribe, please see 
http://www.palm.com/devzone/mailinglists.html

Reply via email to