From: Fons Rademakers (
Date: Fri Mar 12 2004 - 03:37:59 MET

Hi Thomas,

  I've added support for *TOGGLE* without the need for a matching data
member. To do what you want see this piece of cvs log:

add support for *TOGGLE* context menu methods that are not related to a
data member with the same name (e.g. a method that changes a bit in a
data member with a different name). For these methods one can add the
comment option:


to say what the getter method to use, like:

void SetNoExponent(Bool_t noex=kTRUE); //*TOGGLE* *GETTER=GetNoExponent

So in your case:

void SetMyBit(Bool_t b) { ...; } //*TOGGLE* *GETTER=IsMyBit

should do the trick.

Cheers, Fons.

> Hi all,
> why does this functionality need a existing data-member, eg
> Bool_t fMyBit;
> Isn't it enough if the corresponding Set, Get/Is functions are 
> available, eg:
> void SetMyBit(Bool_t b) { b ? SetBit(1<<14) : ResetBit(1<<14); } >
> Bool_t IsMyBit() const { return TestBit(1<<14); }
> Best regards,
> Thomas.
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland
E-Mail:              Phone: +41 22 7679248
WWW:      Fax:   +41 22 7679480

This archive was generated by hypermail 2b29 : Sun Jan 02 2005 - 05:50:06 MET