TControlBar in a class

From: Panos Christakoglou <>
Date: Thu, 04 Aug 2005 14:32:18 +0200

Dear all,

suppose I have a class with two methods (apart from the constructor etc):

void MyClass::PrintEventStats()
void MyClass::ShowResults()

Inside the Show method I create a TControlBar object with several buttons such as "Event stats", "Show analysis cuts" etc. Each of these buttons is supposed to call some other method of the same class. Let's say that the "Event stats" button should call the PrinEventStats method. Inside the class this is implemented as follows:

void MyClass::ShowResults()
  TControlBar *menu1 = new TControlBar("vertical","Event Cuts",10,10);   menu1->AddButton("Event
statistics","MyClass::PrintEventStats()","Displays the event statistics");



It compiles, I load the .so, create a MyClass object but when I press the "Event stats" button I get a segmentation violation.

Any ideas on what to put in the action?


ps: If I use menu1->AddButton("Event
statistics","PrintEventStats()","Displays the event statistics") I get that the fuction is not defined.  

Panos Christakoglou
PH Division
CERN CH-1211 Geneva 23

Tel: +41.22.767.1995
Received on Thu Aug 04 2005 - 14:30:02 MEST

This archive was generated by hypermail 2.2.0 : Tue Jan 02 2007 - 14:45:11 MET