Widget Properties


12-02-2009 14:55:34


Is there a simple way to access the Property list of a widget, i.e. the properties defined in the Events list in the Editor?

I'm using python to act on events raised in the GUI, and I'm defining the script function/object called on events in the Editor. I'm using the UserData list now but I'd prefer to use the Event list if possible for clarity in GUI design.

Something along the lines of:

void btnPress(WidgetPtr sender)


12-02-2009 15:16:41

Actually this events wasn't finished and I'm not sure that it will be in next release. Right now it contain about 20% of all events.
In current implementation events stored in user strings so you can get it using widget->getUserString("event name")


13-02-2009 00:15:02

Yeah, I was reading through the code that handled these strings, but only saw that it was reading the properties directly from the xml when constructing each widget. I'm not really looking for the mappings themselves, I just need to access the values for the properties which I then pass to my script engine. I just bind the events of the widgets themselves to generic handlers that then pass them to the scripting engine.

I'll try out your method tomorrow. Thanks for the prompt reply. :)