Thanks Andreas. Glad you like it. >> Question 1: the output preview of the label does not seem to work when I use a field - is there something I need to >>do to enable it? I would expect it to pull in the first record or some random record to retrieve values?
Ah yes there seems to be a bug with grabbing the first record with some data sources. I get the top feature using layer.featureAt(0) but for some reason not all providers return a record at this index. Writing a patch now. >>Question 2: how does it handle empty fields (null values)? would string concatenation still work or do we need to >>coalesce() like in PostreSQL? Yeah null values when used with || are just converted to empty strings. >> Remark: >> wouldn't it be cleverer to use your great new query builder and introduce the concept of a "virtual column" in the >>data provider? That would be a cool idea and something I have thought about, just don't have the skills or time at present. I plan to redo the field calculator to use my new expression builder widget at some stage so we can look at the virtual column thing then. - Nathan On Thu, Oct 27, 2011 at 5:46 PM, Andreas Neumann <[email protected]>wrote: > Hi Nathan and others, > > Thanks for developing the expression based labeling. Wow - it really looks > great. > > I have two questions and a remark: > > Question 1: the output preview of the label does not seem to work when I > use a field - is there something I need to do to enable it? I would expect > it to pull in the first record or some random record to retrieve values? > > Question 2: how does it handle empty fields (null values)? would string > concatenation still work or do we need to coalesce() like in PostreSQL? > > Remark: > wouldn't it be cleverer to use your great new query builder and introduce > the concept of a "virtual column" in the data provider? This way we could > use your query builder for labeling, for tooltips, for read only display in > tables and forms and in the identify tool. Potentially in the future in > other scenarios as well? The query builder would then extend the data > provider and introduce a new virtual column which could then be treated like > all other columns, but read only. > > Thanks a lot for your cool work and feature enhancement towards labeling! > > Andreas > > -- > -- > Andreas Neumann > Böschacherstrasse 10A > 8624 Grüt (Gossau ZH) > Switzerland > ______________________________**_________________ > Qgis-developer mailing list > [email protected] > http://lists.osgeo.org/**mailman/listinfo/qgis-**developer<http://lists.osgeo.org/mailman/listinfo/qgis-developer> >
_______________________________________________ Qgis-developer mailing list [email protected] http://lists.osgeo.org/mailman/listinfo/qgis-developer
