Hi all,
My app has several forms. On each form, I respond to a user event and do a
FrmGotoForm to move to another form (and other things of course). In some
cases, the form that is active does not get erased when I " go to" another
form. All my forms draw themselves in their init routines, but some of them
are drawn essentially on top of what was the previous form, and I have at
this point absolutely no idea why. You end up looking at a form that is
perfectly functional, controls all work, etc., but the image of the previous
form is still around (though not functional)-- quite a problem.
I'm coming from a Win32 gui background and am used to having multiple
windows in existence at the same time, and it seems that the Palm model is
more a one-at-a-time approach. Is this reasonably accurate? What exactly
do you need to do when switching between them (i.e., what do you need to do,
if anything, in response to the close event as far as the ui manager is
concerned)? Does FrmGotoForm essentially unload the current form and load
the new one? Does using FrmSetActiveForm, on the other hand, allow you to
keep multiple forms "loaded" at the same time and move between them? I
assume there are some rules of thumb regarding when to discard and create
forms vs. when to switch between them? Any insight/explanation of handling
multiple forms would be very much appreciated -- the references I've seen
are all relatively light in the way of conceptual discussion, and I'm
especially confused because the straight FrmGotoForm switch seems to work in
many cases in my app. It seems like it doesn't work when the form contains
fields to which I have assigned my own text handles. I have seen the
problem when I assign NULL handles in the close response to take ownership
back, as well when I don't touch the handles and expect the UI manager to
free them when it unloads the form. The SDK reference tells you what the
generated event sequences are in the case of each function, but it's not
clear what the ui manager does (at least to me).
Thanks very much in advance...honest.
Will