> From: Bobby Kolev
> I have a little problem and would like to hear your comments. When
> executed during standard frmLoad event, the following code (the
> only one in
> a new PalmOS project) causes crash on the Visor ROM and on an actual
> Platinium, while working perfectly fine on all other tested roms,
> including
> the OS40DR5Dbg.
>
> static void MainFormInit(FormPtr frmP)
> {
> ListPtr lst;
>
> LstNewList((void**)&frmP, 5010,
> 10, 40, 100, 40,
> stdFont, 2, 0);
>
> LstNewList((void**)&frmP, 5011,
> 10, 40, 100, 40,
> stdFont, 2, 0);
> }
>
I'm just guessing (because I'm too lazy to really look into it) but the Docs
say "the old formPP value is not necessarily valid after this function
returns. In subsequent calls, always use the new formPP value returned by
this function." If I understand this correctly, it means LstNewList isn't
going to work correctly when called twice unless you do something like:
void ** fPP;
fPP = (void **)&frmP;
LstNewList(fPP, 5010, 10, 40, 100, 40, stdFont, 2, 0);
LstNewList(fPP, 5011, 10, 40, 100, 40, stdFont, 2, 0);
[ Flame me for being lazy if I'm wrong. :) ]
--
For information on using the Palm Developer Forums, or to unsubscribe, please see
http://www.palmos.com/dev/tech/support/forums/