Might I ask why you need this? It is in the "State" only because it is usually not needed... (E.g. the only use in the whole uppsrc is, AFAIK, in DHCtrl).
cbpporter Messages: 1401 Registered: September 2007
Ultimate Contributor
I need it because I have a dialog that need to update itself on a show operation from a cache. I could do something like first update, and then call Show, but since the dialog gets shown from a lot of different places and it's content is determined by the cash, I considered it would be better for the dialog to be the one who "owns" the method of updating. This way all the clients of the dialog don't have to care if it is updated or not, the just show it. It is a better design IMO.
Do you have a better solution for this? In my previous experience with GUI toolkits, OnShow and OnActivate were quite important and events. In U++, this is the first time I need an OnShow event.
I need it because I have a dialog that need to update itself on a show operation from a cache. I could do something like first update, and then call Show, but since the dialog gets shown from a lot of different places and it's content is determined by the cash, I considered it would be better for the dialog to be the one who "owns" the method of updating. This way all the clients of the dialog don't have to care if it is updated or not, the just show it. It is a better design IMO.
Do you have a better solution for this? In my previous experience with GUI toolkits, OnShow and OnActivate were quite important and events. In U++, this is the first time I need an OnShow event.
I would just add some sort of "ShowMe" method which updates from the cache. If you are afraid of calling "normal" Show accidentally, you can always make it private.