Re: dictionnary

Fons Rademakers (Fons.Rademakers@cern.ch)
Tue, 27 May 1997 12:45:18 +0200


Hi Xavier,

did you use rootcint -c to generate a dictionary of you MyText
class? If not do that. Link the dictionary together with MyText.o
in a shared library and it should work. The context menu needs
access to the dictionary to find out which Member functions it
should put in the menu.

Cheers, Fons.

Grave Xavier wrote:
>
> Hi,
>
> I get this message when i'm running my code.
> Warning in <TClass::TClass>: no dictionary for class MyText available
>
> This is the class I use :
> ----------------------------
> #include <fstream.h>
> #include <iostream.h>
> #include "MyText.h"
>
> ClassImp(MyText)
>
> MyText::~MyText()
> {
> }
>
> MyText::MyText():TText()
> {
> val=0.;
> }
>
> MyText::MyText(Coord_t x,Coord_t y,const Text_t *text,double valr):
> TText(x,y,text)
> {
> val=valr;
> }
>
> void MyText::Action()
> {
> cout << val << endl;
> return;
> }
> ---------------------------
> #ifndef __MyText__
> #define __MyText__
>
> //////////////////////////////////////////////////////////////////////////
> //
> //
> // MyText
> //
> //
> //
> // Sensible Text
> //
> //
> //
> //////////////////////////////////////////////////////////////////////////
> #include "TText.h"
>
> class MyText : public TText {
>
> private:
> double val;
>
> public:
> ~MyText();
> MyText();
> MyText(Coord_t x,Coord_t y,const Text_t *text,double valr=0);
> virtual void Action();
> virtual void SetVal(double valr) {val=valr;}
>
> ClassDef(MyText,1) //MyText structure
> };
>
> #endif
>
> If I call the object menu I get a core File.
>
> Thanks for any help.
>
> Xavier
> --
> xavier@virgoa4.in2p3.fr
> De chacun selon ses forces, a chacun selon ses besoins.
> Au fait, tous mes propos n'engagent que moi et aucunement
> l'in2p3 ni le CNRS d'ailleurs.

-- 
Org:    CERN, European Laboratory for Particle Physics.
Mail:   1211 Geneve 23, Switzerland          Phone: +41 22 7679248
E-Mail: Fons.Rademakers@cern.ch              Fax:   +41 22 7677910