tags 355090 +patch thanks It seems that SendDataToPanel is not really a polymorphic function but an unrelated set of functions for which the "virtual" qualifier has been abused.
The following patch should fix the problem for AmayaXMLPanel:
--- Amaya/thotlib/dialogue/creationmenu.c~ 2006-01-13 14:02:52.000000000
+0000
+++ Amaya/thotlib/dialogue/creationmenu.c 2006-03-04 19:26:56.000000000
+0000
@@ -161,7 +161,7 @@
else
p.param3 = (void*)"";
/* the dialog reference used to call the right callback in thotlib */
- p.param4 = (void*)(NumFormElemToBeCreated);
+ p.param7 = NumFormElemToBeCreated;
TtaSendDataToPanel( WXAMAYA_PANEL_XML, p );
#endif /* _WX */
#ifdef _WINGUI
--- Amaya/thotlib/dialogue/AmayaXMLPanel.cpp~ 2006-01-10 14:18:28.000000000
+0000
+++ Amaya/thotlib/dialogue/AmayaXMLPanel.cpp 2006-03-04 19:27:13.000000000
+0000
@@ -99,10 +99,10 @@
-----------------------------------------------------------------------*/
void AmayaXMLPanel::SendDataToPanel( AmayaParams& p )
{
- int nb_el = (int)p.param1;
+ int nb_el = p.param1;
const char * listBuffer = (char *)p.param2;
const char * currentEl = (char *)p.param3;
- int ref = (int)p.param4;;
+ int ref = p.param7;
m_XMLRef = ref;
--- END
There is a similar problem with AmayaApplyClassPanel::SendDataToPanel,
which the following patch should fix:
--- Amaya/amaya/EDITstyle.c~ 2006-02-08 12:22:04.000000000 +0000
+++ Amaya/amaya/EDITstyle.c 2006-03-04 20:21:09.000000000 +0000
@@ -1622,7 +1622,7 @@
p.param1 = 0;
p.param2 = NULL;
p.param3 = NULL;
- p.param4 = (void*)(BaseDialog+AClassForm); /* the dialog reference used
to call the right callback in thotlib */
+ p.param7 = BaseDialog+AClassForm; /* the dialog reference used to call
the right callback in thotlib */
TtaSendDataToPanel( WXAMAYA_PANEL_APPLYCLASS, p );
#endif /* _WX */
return;
--- Amaya/thotlib/dialogue/AmayaApplyClassPanel.cpp~ 2006-01-23
16:30:39.000000000 +0000
+++ Amaya/thotlib/dialogue/AmayaApplyClassPanel.cpp 2006-03-04
19:54:42.000000000 +0000
@@ -117,7 +117,7 @@
int nb_class = p.param1;
const char *listBuffer = (char *)p.param2;
const char *currentClass = (char *)p.param3;
- int ref = (long int)p.param4;
+ int ref = p.param7;
m_ApplyClassRef = ref;
--- END
These changes are, however, untested.
Ben.
--
Ben Hutchings
Humans are not rational beings; they are rationalising beings.
signature.asc
Description: This is a digitally signed message part

