Many thanks for your warm welcome. I do not have any experience with the Palm OS, so
please bear with me; hoever, I do have the "Programmer's Bible" at me side.
I am trying to learn about the Popup List and as part of my "learning" application, I
have a List (ListVarietal - a list of varieties of wine :-) !!). When a slection is
made, I want to put up a Alert box to tell me what was selected - just part of
learning. Well, I am not sure how to handle the strings - even after reading the
"Bible". Now, some of my Procedures/Functions are slightly different from "C" (I can
read "C", but I am not a proficient "C" programmer - Delphi instead). Below is my
Event handler, but everything goes South!! I get the message that I am trying to
access memory that should not be accessed. I understand this (thanks to the "Bible"),
but I do not know how to retrieve the Item and convert it to text that can be put into
the Alert (once I am comfortable doing that, I will put it into an "Edit" field).
Many, many thanks for any help you can offer.........
Todd
++++
procedure PopuptriggerVariety_OnPopSelect(var Handled: Boolean; ControlID: UInt16;
ControlP: ControlType; ListID: UInt16; ListP: ListType; Selection: Int16;
PriorSelection: Int16);
var
Form: FormPtr;
List: ListPtr;
ListIndex: UInt16;
P: MemPtr;
ListText: PChar;
begin
FrmCustomAlert(AlertShow, 'Here I am!, '', '');
Form := FrmGetActiveForm;
//From here on I am lost!!!!
//The name of the List is ListVariety
ListIndex := FrmGetObjectIndex(Form, ListVariety);
List := FrmGetObjectPtr(Form, ListIndex);
P := LstGetSelectionText(List, Selection);
ListText := MemHandleLock(P);
MemHandleFree(P);
Handled := True;
end;
++++
--
Todd Cary
Ariste Software
[EMAIL PROTECTED]
Jim Schram wrote:
> At 7:24 AM -0700 2001/08/21, Todd Cary wrote:
> >I am looking for someone who can answer some Palm OS questions outside
> >of this forum. The reason I need the help off-line is because my
> >development environment is Pascal - not "C", so my questions would not
> >be appropriate to this forum.
>
> This forum is here to answer *any* Palm OS development related question, regardless
>of the development tools used. Depending on the question, you might get better
>answers in one of the more specific forums (either for that tool or for that area of
>the Palm OS). But in any case, don't let that stop you from asking! There is a very
>broad audience of engineering talent lurking here. At the very least someone will be
>happy to tell you where to go (for the answers, of course... for the answers... ;o)
>
> Regards,
>
> Jim Schram
> Palm Incorporated
> Partner Engineering
>
> --
> For information on using the Palm Developer Forums, or to unsubscribe, please see
>http://www.palmos.com/dev/tech/support/forums/
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/