Re: [Pharo-project] [Moose-dev] Re: Highlight problem with glamour
Thanks, Fabrizio. I noticed a similar problem with highlighting Java code, but I thought it was related to the grammar. I CC-ed the Pharo mailing list. Anyone knows why it would be a problem to highlight text with more than 4096 characters in a TextMorph? Cheers, Doru On 12 May 2011, at 16:03, Fabrizio Perin wrote:
It basically breaks after 4096 characters.
On 12 May 2011, at 16:02, Fabrizio Perin wrote:
Hi, i was playing with textlint and i noticed that the highlight is broken. Seems that the problem is related to the length of the text. If you try to execute the script below you notice that the highlight doesn't work. If you lower 1000 to 100 it works. It seems that the break point is 194. After that it dies.
| browser | browser := GLMTabulator new. browser column: #details.
"if you need initial display" browser transmit to: #details; andShow: [:a | a text display: [:x | | string | string := ''.1 to: 1000 do: [:i | string := string, 'jjjjj j j j j j jjj j']. (string asText addAttribute: TextColor red), ('jjjjj j j j j j jjj j' asText) ] ].
browser openOn: 5
Any idea?
Cheers,
Fabrizio _______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
_______________________________________________ Moose-dev mailing list Moose-dev@iam.unibe.ch https://www.iam.unibe.ch/mailman/listinfo/moose-dev
-- www.tudorgirba.com "The coherence of a trip is given by the clearness of the goal."
On 12.05.2011 16:10, Tudor Girba wrote:
Thanks, Fabrizio.
I noticed a similar problem with highlighting Java code, but I thought it was related to the grammar.
I CC-ed the Pharo mailing list.
Anyone knows why it would be a problem to highlight text with more than 4096 characters in a TextMorph?
Cheers, Doru Doru, I have NO idea what Morph GLMTabulator uses to display text, nor any desire of spending time trying to (maybe even succesfully) load Glamour. When posting snippets like that to the Core dev list, at least, PLEASE, either include a doit to load the components needed to reproduce the provided case, or reduce it to something which can be reproduced in core.
| string | string := ''.1 to: 1000 do: [:i | string := string, 'jjjjj j j j j j jjj j']. ((string asText addAttribute: TextColor red), ('jjjjj j j j j j jjj j' asText)) asMorph openInWorld Works just fine, for example. Cheers, Henry
Hi Henrik, On 12 May 2011, at 16:30, Henrik Sperre Johansen wrote:
On 12.05.2011 16:10, Tudor Girba wrote:
Thanks, Fabrizio.
I noticed a similar problem with highlighting Java code, but I thought it was related to the grammar.
I CC-ed the Pharo mailing list.
Anyone knows why it would be a problem to highlight text with more than 4096 characters in a TextMorph?
Cheers, Doru Doru, I have NO idea what Morph GLMTabulator uses to display text, nor any desire of spending time trying to (maybe even succesfully) load Glamour. When posting snippets like that to the Core dev list, at least, PLEASE, either include a doit to load the components needed to reproduce the provided case, or reduce it to something which can be reproduced in core.
| string | string := ''.1 to: 1000 do: [:i | string := string, 'jjjjj j j j j j jjj j']. ((string asText addAttribute: TextColor red), ('jjjjj j j j j j jjj j' asText)) asMorph openInWorld
Works just fine, for example.
Thanks for looking into this. I did not mean that someone should look into the posted code. I was in a hurry and I simply asked a direct question if anyone has any idea of why 4096 would be a limit for highlighting text in TextMorph. The question had nothing to do with Glamour, but I am sorry if the form of the mail made you waste your time. In any case, I will look into this in more details. Cheers, Doru
Cheers, Henry
-- www.tudorgirba.com "To lead is not to demand things, it is to make them happen."
On 12.05.2011 16:42, Tudor Girba wrote:
Hi Henrik,
On 12 May 2011, at 16:30, Henrik Sperre Johansen wrote:
On 12.05.2011 16:10, Tudor Girba wrote:
Thanks, Fabrizio.
I noticed a similar problem with highlighting Java code, but I thought it was related to the grammar.
I CC-ed the Pharo mailing list.
Anyone knows why it would be a problem to highlight text with more than 4096 characters in a TextMorph?
Cheers, Doru Doru, I have NO idea what Morph GLMTabulator uses to display text, nor any desire of spending time trying to (maybe even succesfully) load Glamour. When posting snippets like that to the Core dev list, at least, PLEASE, either include a doit to load the components needed to reproduce the provided case, or reduce it to something which can be reproduced in core.
| string | string := ''.1 to: 1000 do: [:i | string := string, 'jjjjj j j j j j jjj j']. ((string asText addAttribute: TextColor red), ('jjjjj j j j j j jjj j' asText)) asMorph openInWorld
Works just fine, for example. The question had nothing to do with Glamour, but I am sorry if the form of the mail made you waste your time. No problem, it was my decision to waste it. Was meant more as a general comment to inquieries like this, and why they often go unanswered.
And in a way, I guess it did help a little bit, in the sense of clearing TextMorph of involvement :) Good to see it had already been solved! Cheers, Henry
participants (2)
-
Henrik Sperre Johansen -
Tudor Girba