Are you sure about that Elia? LstGetSelectionText is documented as taking a list
and an index and returning a Char*. There's just no mechanism by which a
user-allocated string could be passed in.
The code as James posted looks fine to me (at least with regards to whether or
not it should be generating a low-memory access error -- I leave it to wiser
people to determine whether or not LstGetSelectionText is being called in the
Zen of Palm OS sense). I can only suppose that "something else" is going on. For
instance, if "listptr" were NULL, you'd get that error message.
-- Keith Rollin
-- Palm OS Emulator engineer
"Elia J. Freedman" <[EMAIL PROTECTED]> on 06/23/99 08:27:36 AM
Please respond to [EMAIL PROTECTED]
Sent by: "Elia J. Freedman" <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED]
cc: (Keith Rollin/HQ/3Com)
Subject: RE: accessing from low memory
LstGetSelectionText physically returns the text. You need to create a
string to perform this task.
Elia
-----Original Message-----
From: Colletti, James E [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, June 23, 1999 7:26 AM
To: [EMAIL PROTECTED]
Subject: accessing from low memory
I am new to palm programming and have a question regarding accessing data
from low memory. I am trying to write a selected item from a list object to
a record. The record is a structure of the following type
Typedef struct {
Const char *data;
} StructTest;
I am trying to do the following:
(listptr holds the ptr to the list I am trying to access. I am hardcoding
that I want the first item from the list)
StructTest Thestructure;
Thestructure.data = LstGetSelectionText(listptr, 0);
Before I even get to write this structure to the record, POSE states I am
trying to access data from low memory. What does this mean? Do I need to
save the char ptr as a handle and lock it before I access it?
Any incite would be greatly appreciated. Thanks to all for reading!!
James