>The only obvious difference is that before I lounch form C, I call
>DmQueryRecord(). Does that function have weird side effects ?
None that I know of. I use DmQueryRecord allot without any consequences. I
would start looking at any strings used by form C and make sure they are not
stomping on other variables.
You could also remove any processing done in your FrmInitForm and see if it
returns.
There is also a possibility you are running out of heap space. You can use
MemHeapFreeBytes to compare the available heap before, during and after your
routines are called.
Your description of your code is a little vague, if you are still having
problems you may want to consider posting snippets of your code.
D
-----Original Message-----
From: Patrick Bihan-Faou <[EMAIL PROTECTED]>
To: [EMAIL PROTECTED] <[EMAIL PROTECTED]>
Date: Saturday, July 03, 1999 4:30 PM
Subject: FrmInitForm() never returns...
>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
>
>