> IIRC, on currently existing OS versions, you certainly need the macros
> for list and table draw handlers.
I think I got into trouble trying to do list handlers without them.
> Do you use FrmCloseAllForms()? Again if I recall correctly, on currently
> existing versions of the OS, FrmDispatchEvent() happens not to clobber %a4
> and so form handlers which omit the macros and yet use globals will work
> ok. However, even on those OS versions, FrmCloseAllForms() *does* clobber
> %a4 and so form handlers which omit the macros but use globals in frmClose
> event handling WILL CRASH if you use FrmCloseAllForms (as you should).
I do use FrmCloseAllForms -- but since I do all my state saving from
inside my stopApplication function it's possible I don't reference any
globals from handlers getting called with whatever event comes from
FrmCloseAllForms -- at least among those handlers for forms likely to
be up when I make that call.
> You're living on the edge. It's only pure luck that to date
> FrmDispatchEvent() doesn't clobber %a4. Future OS versions may not be
> so generous (there's nothing in their contract that says they should be).
> The only sane thing to do is to use the macros in *all* handlers and
> callbacks in which you wish to use globals. Or to use a compiler which
> accesses globals via %a5, which Palm OS reserves for this purpose, such
> as the new version which Scott and a few others are using.
Speaking of which....about a month ago a couple of us downloaded the
latest sources for "the new version," built on RedHat and Solaris 7
(successfully) and compiled some PalmOS apps known to be correct. All
crashed our Palms and the emulator in a way that suggested screwed-up
code, but we never did any disassembling to track the problem down
(since the older suite works well enough for prototyping.) Have there
been any changes posted since that would make it worthwhile to try
again.
Thanks,
--Eric House
******************************************************************************
* From the desktop of: Eric House, [EMAIL PROTECTED] *
* Check out Crosswords for PalmOS: <http://www.peak.org/~fixin/xwords> *
* "The instructions said 'Win98 or better' -- so I installed Linux" *
******************************************************************************