Sudipta Ghose wrote:
> In the datebook source code, I found a macro named 
> EvtSetNullEventTick. The macro sets an OS global called 
> NeedNullTickCount. If I use this macro in my code pose gives a 
> warning (as it should). My question is how safe is to use

Not safe.  This came up in Emulator-Forum some months ago.  It's not
archived so I'll paste Keith Rollin's answer below.

> Pose doesn't generate the warning for the Datebook app. It seems 
> that Pose doesn't warn for ROM apps. Is it true? :)

Yes, the built-in apps are allowed to do non-portable things like
access system globals because those apps are custom built for the
particular OS version they come with.  And Palm writes them.  So POSE
lets ROM apps get away with it without a warning.

Here's the original answer on this topic:

> Date: Mon, 1 Feb 1999 17:34:04 -0800
> From: [EMAIL PROTECTED]
> Subject: Re: EvtSetNullEventTick macro trips LoMem monitor
> To: [EMAIL PROTECTED]
>
> I looked into this, and it seems that EvtSetNullEventTick is an 
> exceedingly bad macro to use. It looks at and alters a values whose 
> location in memory changes from OS version to OS version. In Palm OS 
> 1.0, it was at location 0x01D2. Under 2.0 and later, it's at 
> location 0x01DE.
>
> Our headers appear to be partly at fault. Pilot.h implies that 
> UIGlobals.h (which defines EvtSetNullEventTick) is supposed to be 
> protected by the NON_PORTABLE macro. However, our headers don't 
> *enforce* that, allowing people to get into a sticky situation by 
> using non-portable headers without realizing it.
>
> At any rate, unless someone corrects me, I'd say that 
> EvtSetNullEventTick is an evil macro that should be avoided, and 
> it's a good thing that Poser found the problem.
>
> If you absolutely need to use EvtSetNullEventTick, you might want to
> contact our Developer Support group to see if there's an 
> alternative. (What does EvtSetNullEventTick do that just setting the 
> appropriate timeout value for EvtGetEvent doesn't do?)

-slj-

Reply via email to