Hi all,
I wonder whether wxClientData can be used for other purpose, e.g. storing my business logic data used on my own only.
The situation is that, I have a notebook containing many pages, and I wanna store some information on page A and jump to page B to use that info to dynamic update the contents shown in page B. Since my page A and page B are separate classes in different .cc and .h files, and I don't wanna introduce any unhealthy dependencies like cross-dependency, I want to store the information I need in the common parent notebook object using SetClientData and dynamically update the content using the info extracted from GetClientData in the wxEVT_NOTEBOOK_Change bind function.
I searched many post in the forum and samples, but the most common usage is combined with the listBox to store the item, so I'm not so sure whether my personal usage of this client data is correct.
Best,
Quqi
Other usage of wxClientData Topic is solved
Other usage of wxClientData
Windows 10, wxWidgits v3.2.2.1
Re: Other usage of wxClientData
It should work, but I don't think it's a good idea, it sounds quite limited. I'd rather extend the parent notebook with an interface the child panels can communicate with.
Use the source, Luke!
Re: Other usage of wxClientData
Thanks doublemax, I would compare these two methods.
Windows 10, wxWidgits v3.2.2.1