Hi All,

I'm trying to begin using smart pointers, and when I changed my
typedefs like:

typedef TimeSeriesClass* pTimeSeries;
to
typedef boost::shared_ptr<TimeSeriesClass> pTimeSeries;

where:

class TimeSeriesClass : public wxGridTableBase, public tsObject
{
(...)
}

I get an error in this situation:

myDataAnalyserFrame::myDataAnalyserFrame( wxWindow* parent ,
pTimeSeries myTimeSeries)
:
DataAnalyserFrame( parent )
{
   m_myTimeSeries = myTimeSeries;
   m_tsOld = new wxGridStringTable( 1, 1 );

   DataGrid->SetTable(m_myTimeSeries ,false);  => the m_myTimeSeries,
whis is a smart pointer to the TimeSeriesClass, doesn't know that
TimeSeriesClass is also wxGridTableBase child?

   m_myTimeSeries->AutoSizeColsLabels();
   DataGrid->Refresh();
}


 bool SetTable( wxGridTableBase *table, bool takeOwnership = false,
                  wxGrid::wxGridSelectionModes selmode =
                  wxGrid::wxGridSelectCells );


The problem occurs because the smart_pointer to the TimeSeriesClass
seems to ignore that TimeSeriesClass is also a wxGridTableBase. With
normal pointers it functions.

Why it does not work? What i'm doing wrong?

Thanks in advance.

Best Regards.


José Augusto