Hi Sean!
- Luckily, my domain object's printString is what I want for the label of
the legend item. Thus I am able to pass it to #addColor:text: (which I took a while to figure out can take any object for "text:"). I want to pass this object, and not just the label text I want, because that would break the GT Inspector flow. I think there is a missing dimension here for when we want the item and the label to be different. In fact, drop lists in Pharo used to work like this. I think the pattern is carried over from less dynamic or OO languages. In Magritte3, I added #display: to field descriptions of the form [ :domainObject | stringFormToUse ]
I have never thought about having the legend to contains meaningfull object. Are you suggesting something like: #addColor:object:text: that will collocate the object being the legend label and colored box?
- #addColoredText:color: and #addColor:text: - do we really need both?
They are two different method. Consider: b := RTLegendBuilder new. b addColor: Color red text: 'a legend title'. b addColoredText: 'a legend title' color: Color red.
It gives:
Maybe the names are not properly chosen. If you have better ones, would be great :-)
OT: Text builders seem inherently restrictive because they always seem to insert a layer between the full power of the underlying objects and the part that's been translated to the builders. I sense that it would be a game changer (and not too hard) to hook the underlying objects together visually a la Lively Kernel instead of implementing a visual or text builder. In fact, I think that's what e.g. Morphic almost-already-is. It was even alluded to in a few papers as right on the horizon. But it's on the Dreams list for now.
I am not sure to understand. Which text builder are you referring to?
Anyway, thanks for Roassal. This is fun!
Thanks :-)
Alexandre
Cheers, Sean -- View this message in context: http://forum.world.st/RTLegendBuilder-Questions-tp4813331.html Sent from the Moose mailing list archive at Nabble.com. _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev