Sending twice some complex initialization message with inter-mixed state messing smells...
This is for example in CharacterBlockScanner>>buildCharacterBlockIn: (in 3.9 repository see http://source.squeak.org/39a/Graphics-ar.39.diff)... ...but the doubled setStopConditions was there already, the change just swapped some lines... |
Change Set: CenteredTextFix-BG
Date: 31 May 2003 Author: Boris Gaertner In an MVC project, centered text is not displayed centered when it is edited. This is an attempt to fix that glitch. Please have a look at it and give it some testing. After all, a careless change in CharacterScanner can easily ruin the image. ======================= This was when a second #setStopConditions was added preceding the rightMargin setting. My guess is nobody thought to remove the original #setStopConditions further down. Then in 2006 the new #setStopConditions was moved after the rightMargin setting. Cheers, Bob On 9/28/13 3:51 PM, Nicolas Cellier
wrote:
|
Ah, thanks Bob, it seems you saved some historical bits ! I saw that previous timestamp was BG 5/31/2003, I found that it might be 4717CharBlockScannerFix-slg.cs in http://update.squeakfoundation.org/external/updates/updates.list but I did not find any way to browse these change sets.2013/9/28 Bob Arning <[hidden email]>
|
Oh, I saved *lots* of them. In this case I
looked at old images until I found one containing a different
version of that method. I don't know if anyone has saved
everything one one place, but if you download a lot of old images,
you might be able to find the answer (although some of them had
change sets expunged before being made available). You can get the
one in question from http://ftp.squeak.org/3.8/
Cheers, Bob On 9/28/13 4:30 PM, Nicolas Cellier
wrote:
|
Ah OK, I have some of these images, but first thought about browsing the web... It would be nice if http://update.squeakfoundation.org/external/updates were copied to http://ftp.squeak.org/updates though.2013/9/28 Bob Arning <[hidden email]>
|
Looks like it's already there
http://ftp.squeak.org/updates/updates.list Cheers, Bob On 9/28/13 5:30 PM, Nicolas Cellier
wrote:
|
Argh! case of blindness! I did not find because I looked at the date and found nothing before 2006!2013/9/29 Bob Arning <[hidden email]>
|
OK, I understand the fix in CharacterBlockScanner because it is better explained in DisplayScanner: sending stopConditions will initialize alignment inst. var., which for some reasons wasn't set in MVC... Not sure that this is the right fix though... And not sure how this works in Morphic too... I suspect that this could be an unset alignment defaulting to left flush (seing all these alignment ifNil:[textStyle alignment] is a clue) I found that this is due to the leftMargin test in line from scanMultiCharactersFrom:... nextDestX > rightX ifTrue: [destX ~= leftMargin ifTrue: [^stops crossedX]]. It did work OK when this was firstDestX, so it's me who broke it with Multilingual-nice.179 Indeed, only a MultiCompositionScanner would initialize firstDestX := leftMargin, while the other scanner let it nil... 3) The blinking cursor vanishes when cursor is moved at the right of a right flushed line. it even vanishes sooner if last char is blank (space/tab) and the cursor is moved with arrow key (different from mouse click!) 2013/9/29 Nicolas Cellier <[hidden email]>
|
Ah no, buildCharacterBlockIn: is used exclusively by Paragraph and thus by MVC... We should probably unify CharacterBlockScanner response to MVC and Morphic here.This explains why I did not understand how it could work in Morphic: it doesn't. characterBlockAtPoint: aPoint index: index in: textLine ... (text isEmpty or: [(characterPoint y < line top or: [characterPoint x < line left]) or: [characterIndex notNil and: [characterIndex < line first]]]) ifTrue: [Beeper beep. ^ (CharacterBlock new stringIndex: line first text: text topLeft: line leftMargin@line top extent: 0 @ textStyle lineGrid) textLine: line]. And for 3), no idea yet... 2013/9/29 Nicolas Cellier <[hidden email]>
|
And much much fun, I checked that the incorrect display of centered line in MVC is still there!!! This is because A MultiDisplayScanner is used, while the correction has been applied on DisplayScanner only...2013/9/29 Nicolas Cellier <[hidden email]>
|
In reply to this post by Nicolas Cellier
Don't know if it would have helped, but just a friendly reminder that
there's also the new "mc origin" feature in the Inbox which opens an MCVersion inspector on the earliest version known to contain that method. Assuming the change occurred after the invention of Monticello, and the author put the _why_ in there, of course.. ;) On Sat, Sep 28, 2013 at 2:51 PM, Nicolas Cellier <[hidden email]> wrote: > Sending twice some complex initialization message with inter-mixed state > messing smells... > This is for example in CharacterBlockScanner>>buildCharacterBlockIn: > > I found http://bugs.squeak.org/view.php?id=3570 which were included in > Graphics-ar.39 > (in 3.9 repository see http://source.squeak.org/39a/Graphics-ar.39.diff)... > ...but the doubled setStopConditions was there already, the change just > swapped some lines... > > This is not in the Multilingual branch, so it seems newer than 2002... > > Does anyone remember where to dig to understand why, which bug it solves, > which feature it supports, and whether it is really needed? > > > |
Free forum by Nabble | Edit this page |