You've got a char* title arg in your function.  If this string is part of
the control (or any string, for that matter) and isn't around when the form
draws, you'll get the error you're experiencing.  You need to make sure that
any string you associate with the control is persistent and not stack data.

-----Original Message-----
From: Qun Wang [mailto:[EMAIL PROTECTED]]
Sent: Monday, January 17, 2000 4:21 AM
To: Palm Developers Forum List
Subject: SelectDay error.


Hi, I am developing a Multi-Segment Palm application.
I have used the Date Select dialog(which calls SelectDay function) in
several(6) forms in my application. They all works fine.
Today I suddenly found out all the SelectDay calls in my applcation
start to crash.
The error msg I got :  Form.c, Line:1272, Object not in form.
The code in different form all looks like this:
++++++++++++++++++++++++++++++++++++++++++++++++++++++
void SetUserSelDateLabel(Word objID, CharPtr title, DateType aDate)
{
 SWord month, day, year;

 month = aDate.month;
 day     = aDate.day;
 year    = aDate.year + firstYear;

 if (SelectDay (selectDayByDay, &month, &day, &year, title))  //This
line caused the crash!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
 {
  aDate.month = month;
  aDate.day = day;
  aDate.year = year -firstYear; //DateType's year field is 7 bits. max
value is 127
  SetSelTriggerDateLabel(objID, aDate);
 }
}
+++++++++++++++++++++++++++++++++++++++++++++++++++++++
The Strange thing is this code was working perfectly until I added some
new forms several days ago.
Anyone have any idea? Please help.
It gonna be some sort of bug in Palm Platform. But how do I get aound
it?
Fletcher, I think I am having the same problem as you had. Did you find
a solution?
Roger Flores, I am pretty sure the month , day and year is initlized
correctly.
Do you have any idea whatelse can cause this problem.


Thanks,

-QW







Reply via email to