Problems updating to version 9.03

Letschki

12-03-2009 20:46:26

Hello,

I am trying to update my project to QuickGUI 9.03 (from QuickGUI 8.12) but encountered the following problem:

I bind the QuickGUI widgets via luabind to the lua scripting language. I don't bind the QuickGUI classes directly. I have 'wrapper' classes that provide additional functionality. The wrapper classes have more or less the same hierarchy as the QuickGUI classes. I have a ButtonBinding class that is derived from a WidgetBinding class and so on. Until the current version i was able to implement, for example setPosition for all binding classes in the WidgetBinding class that simply called setPosition through a QuickGUI::Widget * pointer.

Unfortunately setPosition is now protected in the QuickGUI::Widget class. The Widget::getPosition() method is public. With the current version i need to implement for example the setPosition() method in all derived binding classes.

Additionally i noticed that the source zip contains the file 'QuickGUITextWidget.cpp' that seems not to be used :) At least i cannot compile it :)

Thanks in advance!

kungfoomasta

12-03-2009 21:59:44

The reason I made certain methods private is because not all widgets should have public "setter" methods. For example a Menu will have MenuItems, the Menu class itself will position and size its child MenuItems correctly. I allow public "getter" methods because I believe users should be able to query all Widget properties, even if they are not able to be set by the user. This means you can find the position of a ListItem, but you cannot change it directly, for example.

I realize this is a big inconvenience for you, sorry for that. If I can't assume TreeViewNodes, PropertyGridItems, ListItems, MenuItems, etc. to follow certain rules such as visibility, position, size, etc. the widgets won't function correctly. Making the functions explicitly protected also protect users from doing things that may cause undefined behavior.

About the QuickGUIITextWidget files, (yes there are two I's in there) its mainly an interface so that the majority of widgets using Text will have the same consistent get/set functions, related to manipulating the text. The only widgets that don't inherit the ITextWidget interface are the TextBox and TextArea classes, although I've tried to imitate the same interface. (The underlying implementation is not the same, so I can't really inherit the interface easily) I realize the class may be poorly named, I could just call it QuickGUITextWidget instead.

Hope that sheds some light on why I made this change. :) Be sure to raise any other issues or suggestions you have!

Letschki

13-03-2009 10:04:44

Thanks for your fast replay.

I understand your reasoning and have no problem to alter my design. Now that i have thought about my problem i think i have found a solution that will work for me (and in the end it should be better/more flexible as the old way) :)

It would be great if there was something like a (more detailed) changelog or porting notes like ogre provides. This would help to plan the time that is needed to update to a new version. I am aware that QuickGUI is a young library and therefore i have to reckon with 'breaking' changes. In the end the changes will make the library easier/more robust and that is worth the effort :)

Altogether it is fun to use QuickGUI and saves a lot of time. Again, big thanks for all your efforts! :)