On Thu, Sep 04, 2008 at 04:09:40PM +0200, Lukas Ocilka wrote:
Arvin Schnell wrote:
On Thu, Sep 04, 2008 at 03:45:36PM +0200, Stefan Hundhammer wrote:
On Donnerstag, 4. September 2008, Jiří Suchomel wrote:
Because of this:
// Most YCP developers never use the return value of UI::OpenDialog(). That is a fact, and it was meant as a statement of fact. But...
What should I do? Open a dialog stating that I coulnd't open a dialog? Or log an error and abort (what happens already)?
But what you actually *can* do, is really checking whether opening the dialog was successful and only in that case you can close it.
See this common example:
[...] I will not clutter code with that stuff. With this brand new concept of object oriented programming the effect would be easy to achieve. Create an object that opens the dialog and remembers the status. In the destructor close the dialog. The dialog would even be closed when returning in the middle of the function. Just like fstream objects in C++. ciao Arvin -- To unsubscribe, e-mail: yast-devel+unsubscribe@opensuse.org For additional commands, e-mail: yast-devel+help@opensuse.org