[Pharo-users] GLMFormatedPresentation>>format bug?
chisvasileandrei at gmail.com
Sun May 15 18:08:01 EDT 2016
Try something like this. Now 100% sure it will work.
^ composite text
format: [self asText].
The display block should return the object to be displayed, which is this
case is self.
On Sun, May 15, 2016 at 11:58 PM, Alistair Grant <akgrant0710 at gmail.com>
> Hi All,
> I'm currently porting my personal documentation system from Python /
> Django to Pharo and am trying to display formatted text in a new pane in
> the inspector. If I execute something like:
> | text |
> text := 'Hello World' asText.
> text addAttribute: TextColor green from: 1 to: 6.
> in a playground using "Do it and go", the text is displayed correctly
> (with formatting).
> If I add a method in the object I want to inspect:
> gtInspectIn: composite
> <gtInspectorPresentationOrder: 30>
> ^ composite text
> title: 'Meme';
> display: [self asText].
> the formatting disappears.
> I'm able to "fix" the problem by changing:
> ^ format ifNil: [ format := #asString ]
> ^ format ifNil: [ format := #asText ]
> Is someone more knowledgable about Glamour able to confirm that this is
> really a bug? If so, I'll submit a formal bug report on fogbugz. (If
> there's a better solution, that would be great too).
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Pharo-users