Hi,
I wrote a small application that has three non-modal forms. Two of these
forms (A and B) are only used to display the content of 2 databases. The
third "non modal" form (C) is used to create a new record in one of the DB.
Form A can go to form C only for the creation of a new record.
Form B can go to form C in order to create a new record or edit an old one
(from the list).
Form C can switch to form A or B. The switching saves the current entry to
the database.
Form C can also save the current entry to the DB and create a new one from
scratch.
In order to switch between forms I use FrmGotoForm(formID).
Before I switch to form C, I call either a function that sets up empty data
structures for the new record or a function that obtains the database record
(using DmQueryRecord()) and sets up the data structures with their proper
values.
Whenever I go to form C to create a new DB record, everything is happy.
Whenever I go from form B to form C in order to EDIT an existing record
then:
- form C is loaded properly and functions well
- I can create new records without exiting form C
- whenever I want to go back to either form A or B, then I can see (in the
debugger) form C closing everything, saving the current record to the DB,
release all the dynamic memory it used, etc.
Then the application receives the "frmOpenForm" event and tries to
initialize the new form (A or B). The execution goes to FrmInitForm(formID)
and stays there. FrmInitForm NEVER RETURNS !!!
Has anybody seen something like that before ? What am I doing wrong ?
The only obvious difference is that before I lounch form C, I call
DmQueryRecord(). Does that function have weird side effects ?
For information I am using my Palm Pilot (IIIx with PalmOS 3.1) and the
emulator (2.1d28) with debug and non-debug versions of the PalmOS 3.1 ROM.
All show the same behaviour.
Can anybody help ?
Thanks in advance,
Patrick.
--
Patrick Bihan-Faou, email: [EMAIL PROTECTED]
MindStep Corporation tel: (613) 526 5062
fax: (613) 526 2417
web: www.mindstep.com