[litwindow-users] Re: m_current as a pointer
Status: Alpha
Brought to you by:
hajokirchhoff
From: Hajo K. <mai...@ha...> - 2005-04-28 09:48:39
|
yrs90 wrote: >>I wonder if m_current as a pointer into the underlying data is >>causing a circular reference somewhere during change resolution. > > > I see now. When m_current is made a pointer that points into the underlying > data, the notification process does enter a death loop. Of course, the nice Can you post the relevant code? m_current declaration, and where you call NotifyChanged and other relevant places. > Aside: While looking through the code, I noticed that in dataadapterimp.h, > the function implementation for converter_abstract_base::destroy() throws an > exception claiming to be clone. Perhaps that body should belong to the > function converter_abstract_base::clone(), which is declared directly before > destroy()? No. Thats a cut&paste error. It should read "not_implemented("destroy (abstract class)". The clone body is at dataadapter.h, line 871. I'll correct and commit it. Thanks for finding. BTW, I don't know if you have stumbled across create, clone and destroy yet as they are still undocumented. Together with a couple of other methods they implement an object factory, giving you the ability to create and clone objects dynamically by type, similar to the wxWidgets runtime type system. Comes in useful when you want to write a generic insert method for your control. Have a look at objectfactorytests.cpp for more information. Regards Hajo |