> > CtlHandleEvent sure enough sends a ctlEnterEvent for me, on OS3.3. are
you
> > sure there isn't something more to this problem?
>
> It works for me as well, but when a form is called or switched, however
you want
> to say it, from my Main Form which is the first initialized,
CtlHandleEvent
> no longer sends a ctlEnterEvent to any other forms. I open these forms by
> calling the function FrmGotoForm. The current form is closed correctly,
the new
> form is opened corretly, and it does receive penDownEvent.
since it's not working, you might want to question your assumptions that
"the current form is closed correctly" and that "the new form is opened
correctly".
if you look at the source for CtlHandleEvent, it's hard to escape the
conclusion that the new form is *not* being opened correctly. i was going
to ask, "what is the frmOpenEvent code in one of the forms that doesn't
work?" but then i looked at your code and realized you aren't even providing
form handlers, nor do you seem to be calling FrmDispatchEvent ever.
> > what is the code for your event loop?
>
> static Boolean MainOBSHandleEvent(EventPtr event)
eh? this MainOBSHandleEvent is quite an unusual event loop. it looks like
maybe all your forms must use the same logic, so you decided to roll that
logic into your main event loop, and never call FrmDispatchEvent. is that
correct?
also, i didn't see any code to handle the frmLoadEvent -- where are the
calls to FrmInitForm and FrmSetActiveForm, much less the call to
FrmSetEventHandler? without those, the new form has not been opened
correctly.
> > what is the code for any non-OS functions called by your event loop?
>
> See above, this is the form event handler for the form that is called.
that was not a form event handler. that was your main event loop. they are
not at all the same thing. it looks like you don't even have a form event
handler, which is probably the root of your problems.
> > does it handle penDownEvent or penUpEvent? if so, what is the code?
>
> Yes, see above.
no it doesn't. the only reference to penDownEvent was commented out, and
penUpEvent was not referenced at all.