On 7/2/07, James <[EMAIL PROTECTED]> wrote:
Hello all, I am having a brain cramp or something. I try the following on the palmm and I get an error of reading from an invalid memory.I have the following: char *name[] = { "tom", "dick", "harry" }; char **names = name; Then I have a function that does a cast onto the pointer ( UInt8 *) Now I tried this on GCC (PC compiler) and it works fine, it gives me back the right string I ask for? Am I missing something here??
yes. you need to know and understand how strings are stored in palmos code. typically, they are either stored in your .data segment or, depending on computer settings, they can be stored within your .text segment. its a funky setup, and its best solved by redesigning for the palmos environment. strings in text segments are read-only, as dynamic memory is limited. if you want to store strings, consider using a string list as a resource, and then locking that down and using it. not everything you do on the pc will work the same way on the handheld, in some cases, major design changes are needed. -- // Aaron Ardiri -- For information on using the ACCESS Developer Forums, or to unsubscribe, please see http://www.access-company.com/developers/forums/
