Nope...none of you is right, I believe. To start with, there is no
difference between
LstNewList((void**) frmP, 5010, 10, 40, 100, 40, stdFont, 2, 0);
LstNewList((void**) frmP, 5011, 10, 40, 100, 40, stdFont, 2, 0);
and
fPP = (void **)&frmP;
LstNewList(fPP, 5010, 10, 40, 100, 40, stdFont, 2, 0);
LstNewList(fPP, 5011, 10, 40, 100, 40, stdFont, 2, 0);
Second, if the function was not returning valid pointer then why it would
need an address of the variable at first place?! PalmOS was relatively well
designed and if it asks for an address pointer this means it may need to
change it and you may need to be aware of that. In my read, the docs are
only emphasizing what the function definition says by itself - "beware, I
may modify this variable!". That is, call to FrmGetActiveForm() is not
necessary, because the function already returns the new form structure
address.
In addition, the test of both suggestions (for the sake of my pride) shows
that it still crashes on that particular ROM.
- bobby
-----Original Message-----
From: Steve Mann [mailto:[EMAIL PROTECTED]]
Sent: Tuesday, April 10, 2001 3:50 PM
To: Palm Developer Forum
Subject: RE: Dynamic UI and Visor Platinium
>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);
That's probably it (it's amazing what you can find out when you
RTFM). I don't think your code above will work, though. I believe
that a copy of the original form pointer it going to be as invalid as
the original form pointer. I think he needs to do something like:
FormPtr frmP2;
LstNewList((void**)&frmP, 5010, 10, 40, 100, 40, stdFont, 2, 0);
frmP2 = FrmGetActiveForm (); // assumes you're working with the active form
LstNewList((void**)&frmP2, 5011, 10, 40, 100, 40, stdFont, 2, 0);
Regards,
Steve Mann
--
-------------------------------------------
Creative Digital Publishing Inc.
1315 Palm Street, San Luis Obispo, CA 93401-3117
-------------------------------------------
805.784.9461 805.784.9462 (fax)
[EMAIL PROTECTED] http://www.cdpubs.com
--
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/