[EMAIL PROTECTED] wrote:
> are there little things to change in Palm OS that would help?

(1) An oldie but a goodie: fix all the incorrectly declared const
pointer arguments everywhere in the SDK headers:

    void CtlSetLabel( ..., const CharPtr newLabel ); // NO!
    void CtlSetLabel( ..., const Char *  newLabel ); // correct

This is because (const CharPtr) really means (char * const) and not
(const char *) which was intended.  This requires unpleasant casting
away const to work around it in C++.

(I know some of this work was being done already, and may be all
perfectly fixed in the new 3.1 SDK I haven't examined yet.)

(2) Also remove unneeded const qualifiers on by-value arguments:

    Word FrmAlert ( const Word alertId ); // NO!
    Word FrmAlert (       Word alertId ); // correct

The const in this case is totally unneeded, as it only enforces
constness _within_ the function body, not out in the scope of the
caller, since the argument is passed by value on the stack.

(3) Try to unify the Handle and VoidHand data types.  They are not
assignment compatible in C++.

-slj-

Reply via email to