[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

1.4.1 NewTypes.h

With Palm OS SDKs prior to the 3.5 SDK, programmers were encouraged to use typedefs such as DWord and VoidHand rather than the built-in types. In the 3.5 SDK, the names of these typedefs have been changed to the somewhat more mnemonic UInt32 (etc) and the rather more functional MemHandle. (Previously there were two "handle" datatypes, VoidHand and Handle, with no real reason for a distinction between them, and programmers were continually casting between them. MemHandle corrects this historical accident.)

People wanting to write library header files capable of interacting with any SDK have a dilemma: which to use, old- or new-style type names?

You can use old-style names by instructing developers to include `PalmCompatibility.h' before including your header file if they are using the 3.5 SDK. But this is not very satisfactory: the onus shouldn't be on developers to get this right, and you might prefer to use new-style names.

You can ensure new-style names are available simply by including `NewTypes.h' at the top of your header file, and instructing developers to include at least `Common.h'/`PalmTypes.h' before your header. (They are probably including `Pilot.h'/`PalmOS.h' anyway.)

Including `NewTypes.h' provides the following:



This document was generated by Guillaume Rousse on December, 12 2004 using texi2html