Connect Widgets in a TApplication (Solved)


I’ve got a big set of code I wrote for use with ACLiC that I’m trying to turn into it’s own application. I wrote the original code as a class and I gave it a GUI to make it easy to use. It worked, but now when I compile it as an application, none of the widgets connect to the proper functions. So far, all I’ve done is the minimum to get it to compile as an app (add a main() function).

The bare bones main() function

#include <stdlib.h>
#include <TApplication.h>
#include <TGClient.h>
#include <TFile.h>
#include <TTree.h>

#include “ScopeApp.h”

int main(int argc, char** argv) {
TApplication theApp(“App”,&argc,argv);
TFile *a=TFile::Open("/media/Data/PhysicsResearch/MTestData/T1006_CombinedRuns.root");
TTree Data=(TTree) a->Get(“BeamData”);
Scope *s=new Scope(Data);


return (EXIT_SUCCESS);


My class calls the GUI last in the constructor and the widgets are connected like this

           TGTextButton *DrawTraces = new TGTextButton(ScopeFrame,"Draw Traces");
           DrawTraces->SetToolTipText("Clicking this button re-draws the traces for the current event");

Though to get it to compile I had to remove ClassDef(Scope,1) and ClassImp(Scope) and I replaced them with RQ_OBJECT(“Scope”) in the class definition. The error message is this:


EDIT: I figured it out. I wasn’t including the dictionary properly when building the application.