At 03:15 AM 1/7/2007, you wrote:
Subject: Re: Showing Dynamic popup list
From: Waylander <[EMAIL PROTECTED]>
Date: Sun, 7 Jan 2007 10:19:46 +1300
Hi rupesh,
I have done that already. My problem is when I click on the popup trigger
the list will not show properly.
Also I have the same problem if I click on an item in a dynamic list
(without a popup trigger) I get the list item changing to a random symbol
and then this error:
----------------------------
AnotherTest (unknown version) just read from memory location 0x01010056,
causing a bus error.
A "bus error" means that the application accessed a memory location that is
not in RAM or ROM, nor corresponds to a memory-mapped hardware register.
----------------------------
My code for that is:
-----------------------------
FrmSetEventHandler(frm, MainFormHandleEvent);
FrmNewLabel(&frm, 3215,"Hi there",80,
80, stdFont);
Char* c[5] = {"one","two","three","four","five"};
This is your problem. The array you pass to the list must
be at least as persistent as the form.
So "const Char * c[5] ...." would work in this specific example.
Int16 stringCount = 5;
ListType* list;
LstNewList((void**)&frm,8000,80,80,50,50,stdFont,5,NULL);
list = (ListType*)FrmGetObjectPtr(frm, FrmGetObjectIndex(frm,
(UInt16)8000));
LstSetListChoices(list, c, stringCount);
LstSetSelection(list,-1);
LstDrawList(list);
----------------------------
Roger Stringer
Marietta Systems, Inc. (www.rf-tp.com)
--
For information on using the PalmSource Developer Forums, or to unsubscribe,
please see http://www.palmos.com/dev/support/forums/