At 4:08 PM +0930 10/4/99, Nick Hammond wrote:
The documentation for FrmSetTitle (SDK Ref P273) says:
"This function saves the pointer passed in newTitle; it does not
make a copy. Don't pass a pointer to a stack-based object in
newTitle." (i.e. the warning you saw about not changing a title
appears to be incorrect)
The warning applies to FrmCopyTitle rather than FrmSetTitle.
From page 274 of docs:
The size of the new title must not exceed the title size defined in the
resource. When defining the title in the resource, specify an initial
size at least as big as any of string to be assigned dynamically.
Also, there is a bug in FrmCopyTitle (may have been fixed >
3.0). As I wrote:
FrmSetTitle doesn't update the display correctly if the title is getting shorter. This may have been fixed, but it was true in Palm OS 3.0.
To see this bug, try using the down button to advance from Dec
31 to Jan 1 in the Datebook.
So you have to choose:
- Use FrmSetTitle. Allocate your new title dynamically. Avoid making the title narrower.
- Use FrmCopyTitle. Make sure you specify a big enough title in the resource.
Aside from the display bug, this is all in the docs.
-
Danny Epstein, Applied Thought Corporation
Have friends with Palm organizers? Get BeamBooks!
http://www.appliedthought.com/beambooks
Danny Epstein, Applied Thought Corporation
Have friends with Palm organizers? Get BeamBooks!
http://www.appliedthought.com/beambooks
