wxDataViewCtrl issues

Francesco Montorsi f18m_cpp217828 at yahoo.it
Sun Feb 4 11:46:35 PST 2007


Vadim Zeitlin ha scritto:
> RR> > it does not use refcounting 
> RR> 
> RR> Which is indeed wrong. I'm not sure if we need to use
> RR> wxObject's ref counting or should use our own, but
> RR> it should be ref counted.
> 
>  I agree that the model should be ref counted but I also think this should
> be completely hidden from the user.
yep - this would be the best.

> I don't see what does it have to do
> with it being an ABC though?
hmmm, maybe it's trivial but then, can you complete my homeworks?

Problem text: given wxDataViewListModel is an abstract class, fill in the gaps 
using wxObject's refcounting mechanism:


class WXDLLIMPEXP_ADV wxDataViewCtrlBase: public wxControl
{
    ...

private:
     /* current code:      wxDataViewListModel    *m_model;     */
     ...     // gap #1
};

wxDataViewCtrlBase::~wxDataViewCtrlBase()
{
    /* currently is empty */

    ...  // gap #2
}

bool wxDataViewCtrlBase::AssociateModel( wxDataViewListModel *model )
{
     /* current code:    m_model = model;   */

     .... // gap #3

     return true;
}

:)


Thanks,
Francesco






More information about the wx-dev mailing list