"victor rey" <[EMAIL PROTECTED]> writes:

> Hi,
> as the subject says I'm getting this error message and I need help, a
> lot of help. After reading all messages about this error I don't get
> solving this one. I read, for example, if in close event I returned
> true I had to do first frmeraseform and then frmdeleteform. 

So don't return true when you process frmCloseEvent. By returning true
in your event handler, you are telling PalmOS to immediately stop
processing that event in its tracks. But, there are many events that the
standard FrmHandleEvent() needs to see in order to make PalmOS behave
correctly.

frmCloseEvent is a prime example. The default handler will erase the
form and delete it, so you don't have to. You should not try duplicate
the standard functionality in your own event handler. Not only is it a
waste of code, who is to say that some future version of PalmOS won't
have some new functionality that you haven't duplicated?

In general, it's better to let FrmHandleEvent() see the event rather
than set handled to true. I only set handled to true if I know that the
default handler is going to do something I don't like.  For example, I
set true on menu events because the default action is to beep on
unhandled menu events. If I have a custom gadget, I set true on
frmUpdateEvent, otherwise the default handler will call FrmDrawForm()
and erase my gadget. If in doubt, leave handled as false.

-- 
Dave Carrigan ([EMAIL PROTECTED])            | Yow!  It's a hole all the way to
UNIX-Apache-Perl-Linux-Firewalls-LDAP-C-DNS | downtown Burbank!
Seattle, WA, USA                            | 
http://www.rudedog.org/                     | 


-- 
For information on using the ACCESS Developer Forums, or to unsubscribe, please 
see http://www.access-company.com/developers/forums/

Reply via email to