paragui-users
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[paragui-users] several fixes


From: Mark Junker
Subject: [paragui-users] several fixes
Date: 23 Jun 2003 08:21:00 +0100
User-agent: OpenXP/32 v3.8.8 (Win32) beta

Hi,

I fixed every obvious problem I had with the ParaGUI library using Borland  
C++ Builder 5.

I solved the event problem by using a template function called  
"SetEventObject" in PG_MessageObject with the following definition:

template <class T>
void SetEventObject(PG_MSG_TYPE type, T* calledobj, MSG_CALLBACK_OBJ cbfunc, 
void *clientdata = NULL) {
        RegisterEventHandlerObj(type, this, (void*) calledobj, calledobj, 
cbfunc, clientdata);
}

where RegisterEventHandlerObj is just a wrapper for  
PG_RegisterEventHandlerObj to avoid namespace pollution by including  
pgmsgmap.h at the beginning of pgmessageobject.h

I also enhanced the structure PG_EVENTHANDLERDATA by the member
  void *calledobj_real;

The function "PG_MessageObject::SendMessage" contains the instruction to call  
the event handler. The specific lines have to be changed to:

if(cbdata->calledobj != NULL) {
  rc = (((PG_EventObject*) cbdata->calledobj_real)->*(cbdata->obj_cbfunc))(id, 
(PG_Widget*)this, data, cbdata->data);
}

Now my questions are:
1. How can I apply patches?
2. How will the testing be done for the other platforms?

Regards,
Mark Junker




reply via email to

[Prev in Thread] Current Thread [Next in Thread]