I use the following, to display a popup list
selectP = LstGetSelectionText(listP, LstPopupList(listP));
A user reports that "just scrolling" without any selection
causes a fatal error. I have tested this on POSE and it shows
no problem with scrolling the list.
I do absolutely no processing in this list until after something is
selected. I process no events for tapping the scroll bars on this
list. However, I'm pretty sure that the form handler has events
passed to it, when the user scrolls. As a result, I might be
executing the function below, each time the scroll button is pressed.
I do call the following function at the end of the Event Handler for
this form. All it does is adjust the field font, if the width of the
text exceeds a specified number of characters. Since nothing is
selected (error occurs while just scrolling), this function is
probably repeatedly called. But I don't see anything in this
function that would cause a fatal error by just scrolling the list.
void AdjustFieldFont(Word fldID, int width) {
FormPtr form;
FieldPtr fldP;
form = FrmGetActiveForm();
fldP = FrmGetObjectPtr(form, FrmGetObjectIndex(form, fldID));
if(FldGetTextLength(fldP)>width) {
FldSetFont(fldP, stdFont);
}
else {
FldSetFont(fldP, largeFont);
}
}
Anyone have any clues as to why scrolling the popup list, would
cause a Fatal Error?
Anyone see anything wrong with this function call.
Mike
--
-----------------------------------------------------------------
Discussion Group: http://www.halcyon.com/ipscone/wwwboard/
Protect your constitutional rights. Your favorite one may be next!
-----------------------------------------------------------------