Object Identification

Object Identification

As I promised in my last post, we I will talk about some new Squish features which we are working on here. Today I’d like to talk about some object name enhancements which will appear in Squish 3.2.

In Squish 3.1 we already introduced multi-property names in Squish as an alternative (now default) object naming scheme (Squish/Web uses this since 3.0 already). Admittingly there were some bugs in Squish 3.1.0′ multi-property name generation for Squish/Qt, but it works quite well in 3.1.1 now.

Such a name may look like

{type=’QPushButton’ label=’OK’ windowCaption=’MySuperApp 2.9′ windowType=’QDialog’}

This will identify the OK button in the dialog with the caption ‘MySuper App 2.9′. Note that this name is quite robust because it will work even if the dialog’s internal hierarchy/structure changes and also it is robust even though no QObject name has been set for the button.

But there is one disadvantage: The caption has a version number. So when you increase your app’s version number you need to do a change in the object map.

One improvement in Squish 3.2 will be that you will be able to do wildcard and regex matching in the name. So you could then do e.g.

windowCaption~=’MySuper App *’

instead. This will certainly help many users out there 🙂

But there are two more improvements in the object naming which we will do. One is that a name can refer to another widget directly by a name (real or symbolic). So we won’t have containerName, containerType, widgetLabelLeft, etc. anymore but just container=’name’, etc. This way names will become even better maintainable.

The other improvement will be that it will be possible to configure which properties to use for identification for which object types. This is useful for custom widgets and also if you want to override a default behavior.

So much for today, more coming in the next days…