I’m trying to use the RpFormSingleSelect function in a web page, and I’m having an issue. If I include a drop down list in my page, when I hit the Apply button to submit the form, my app crashes immediately. This seems to happen even before the set* functions are called, much less the apply function, because diagnostic code placed in the set* functions doesn’t get called.
My HTML code looks like this:
Option 1
Option 2
This generates code in my *_v.c file like this:
extern rpOneOfSeveral getOption(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
rpOneOfSeveral getOption(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
rpOneOfSeveral theResult;
return theResult;
}
extern void setOption(void *theTaskDataPtr, rpOneOfSeveral theValue,
char *theNamePtr, Signed16Ptr theIndexValuesPtr);
void setOption(void *theTaskDataPtr, rpOneOfSeveral theValue,
char *theNamePtr, Signed16Ptr theIndexValuesPtr) {
return;
}
I change this to read as follows:
extern rpOneOfSeveral getOption(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr);
rpOneOfSeveral getOption(void *theTaskDataPtr, char *theNamePtr,
Signed16Ptr theIndexValuesPtr) {
rpOneOfSeveral theResult;
theResult = MyOptionValue; // only 1 or 2 is valid
return theResult;
}
extern void setOption(void *theTaskDataPtr, rpOneOfSeveral theValue,
char *theNamePtr, Signed16Ptr theIndexValuesPtr);
void setOption(void *theTaskDataPtr, rpOneOfSeveral theValue,
char *theNamePtr, Signed16Ptr theIndexValuesPtr) {
MyOptionValue = theValue; // only 1 or 2 is valid
return;
}
I’ve also tried using Function instead of Complex. Other than the different function signatures, the results are the same.
If I leave out the RpFormSingleSelect from my web page altogether, everything works fine.
Any ideas what is going wrong and how to fix it?
Thanks,
Jeff.