TGNumberEntry error

Hi,

I’m experimenting with TGNumberEntry, and I’m getting an error just creating a TGNumberEntry object.

My code is attached…

root [8] .L numberEntry.C
reloading /home/mkoms/root_stuff/analysisModule/./numberEntry.C 0
reloading RQ_OBJECT.h 0
reloading Varargs.h 0
reloading stdarg.h 0
root [9] example()
Error: Symbol kENTRY1 is not defined in current scope FILE:numberEntry.C LINE:39
Error: Symbol kNELNoLimits is not defined in current scope FILE:numberEntry.C LINE:39
*** Interpreter error recovered ***

Thank you,
Mikhail
numberEntry.C (1.85 KB)

Also I just added
#include

to the top of the file, and no change.

Hi Mikhail,

Well, the error is what it says : you did not define kENTRY1…
You have to add this kind of definition either in class definition, or externally:

enum EEntriesId { kENTRY1, kENTRY2 };
And there are a few errors in your code:

use: TGNumberEntry *fN1 = new TGNumberEntryinstead of: TGNumberEntry fN1 = new TGNumberEntry

and correct this typo: TGNumberFOrmat::kNELNoLimits into: TGNumberFormat::kNELNoLimits

Cheers,
Bertrand.