I have an existing app which has been built with PhAB on top of C++ code. Now I am trying to add a dialog module and stay consistent with the C++ coding style, and I have problems getting it to compile.
I’m adding a dialog called GetDataDlg that is instantiated in response to a menu selection. The dialog has three widgets, and the only callbacks I’m concerned about at present are a setup function called before realizing the dialog, an item selection callback, and an action function to be called upon a button click. The functions are all declared and defined in a class GetDataDlg, in the files GetDataDlg.h & GetDataDlg.cpp.
I have had this all compiled and working in the straight C code for which PhAB generates stubs.
Now when I try to compile I get the following messages:
abevents.h:149: assuming & on GetDataDlg::gd_getSelection' abevents.h:149: converting from
int (GetDataDlg::*)(PtWidget_t *, ApInfo_t *, P
tCallbackInfo_t )’ to int (*)(PtWidget_t *, ApInfo_t *, PtCallbackInfo_t *)' abevents.h:149: assuming & on
GetDataDlg::gd_action’
abevents.h:149: converting from int (GetDataDlg::*)(PtWidget_t *, ApInfo_t *, P tCallbackInfo_t *)' to
int ()(PtWidget_t *, ApInfo_t *, PtCallbackInfo_t *)’
I have looked at abevents.h (which is a generated file), and the line in question looks like:
static const ApEventLink_t AbLinks_GetDataDlg[] = {
{ 8, 0, 0L, 0L, 0L, NULL, NULL, “PtGetDataList”, 23010, GetDataDlg::gd_getSelection, 0, 0, 0, 0 }
{ 10, 0, 0L, 0L, 0L, NULL, NULL, “PtCancel”, 2009, NULL, 0, 0, 0, 0, },
{ 8, 0, 0L, 0L, 0L, NULL, NULL, “PtPerfActionBtn”, 2009, GetDataDlg::gd_action, 0, 0, 0, 0 }
{ 0 }
};
I can’t see that these entries differ in form or substance from other entries that compile just fine.
Can anyone shed any light on this conundrum?
Thanks,
Randy C.