Re: [ROOT] TCanvas, TFitPanel TDrawPanel ownership?...

From: Rene Brun (Rene.Brun@cern.ch)
Date: Tue Aug 07 2001 - 15:07:10 MEST


Hi Denis,

Are you selecting again "FitPanel" on "h2" ?
Otherwise the Fitpanel will invoke the Fit function of the deleted "h1"
The FitPanel has no way to find out which histo you want to fit if you
do not pass the information. Anyhow, i will protect TFitPanel to clear
the pointer to the histogram when the histogram is deleted.

Rene Brun

Denis Bertini wrote:
> 
> On Tue, 7 Aug 2001, Rene Brun wrote:
> 
> > Hi Denis,
> >
> > No, this is not possible. The TFitPanel created by "h1" may be used
> > by "h2" when you delete "h1".
>   I understand completely your point. But the point is the following:
> 
>   In ROOT version 3.01/06 (11 July 2001) if i draw an histogram using
>   TBrowser and from this histo h1  i open let's say a TFitPanel.
>   Then i delete the histo h1 and the TFitPanel is not closed.
>   I draw another histo (h2) and want to reuse the TFitPanel not closed.
>   It crashes giving a segv.
>   May be i have done something wrong, in that case can you give me the
>   right procedure how to reuse my TFitPanel.
> 
> 
> > Same principle for a normal TCanvas created by double clicking in a TBrowser.
> > You do not want to delete this canvas when deleting the histogram.
> >
>  i agree with that.
> 
>                                     Denis



This archive was generated by hypermail 2b29 : Tue Jan 01 2002 - 17:50:56 MET