Neil Whitworth a écrit :
Luc Le Blanc wrote:
I need to store a table of geodesic datum conversion factors (about 300
doubles.) If I put it in my code as a const struct, does it eat up my heap? Or
should I instead put the data into an auxiliary PDB I can read only when I need
to access the specific data I need?
Luc Le Blanc
You could alsow save the data as a resource in you app prc. I believe
there is also a 'integer array' resource type.
At least Constructor doesn't know about this resource type.
If PalmOS resources emulate the MacOS' you should be able to create
your own resource types and even provide a template for editing
(by ResEdit.) But my MacOS days are long gone and I don't if this
brilliant idea still works.
My arrays are a little more complex than just integers:
typedef struct
{
double radius;
double flattening;
} Ellipsoid;
typedef struct
{
Char name[ DatumNameLength ];
UInt16 ellipsoid;
float dX, dY, dZ;
} Datum;
Just lock the resource
when the app starts, and unlock when it quits. Then you only need a
single global pointer and can keep bith code & data segemnst smaller.
Aren't resources linked with one of the code segments? That's my
impression from the CW 9.3 Segment tab.
--
Luc Le Blanc
--
For information on using the ACCESS Developer Forums, or to unsubscribe, please
see http://www.access-company.com/developers/forums/