'Allo, all...
I'm attempting to use the SelectDay dialog, to allow
the user to select a day. Following is the code:
FormPtr frm = FrmGetActiveForm();
SWord month, day, year;
CharPtr label;
CharPtr title;
ControlPtr ctl;
title = "Test";
if (SelectDay (selectDayByDay, &month, &day, &year,
title))
{
// Set the label of the date selector.
ctl =
FrmGetObjectPtr(frm,FrmGetObjectIndex(frm,MainDateSelTrigger));
label = CtlGetLabel (ctl);
DateToDOWDMFormat (month, day, year, ShortDateFormat,
label);
CtlSetLabel (ctl, label);
}
MemPtrUnlock (title);
Whenever I try to click on the selector trigger to get
the date dialog, I get an error stating: Form.c,
Line:1272, Object not in form.
I've verified that the ID MainDateSelTrigger exists.
What am I missing?
Any help would be very much appreciated!
Thanks,
Fletcher Bumpus
=====
----------------------------------------------------------------
Lottory (n): A tax on people who failed math.
__________________________________________________
Do You Yahoo!?
Talk to your friends online with Yahoo! Messenger.
http://messenger.yahoo.com