The Trunk: Morphic-nice.691.mcz

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

The Trunk: Morphic-nice.691.mcz

commits-2
Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
http://source.squeak.org/trunk/Morphic-nice.691.mcz

==================== Summary ====================

Name: Morphic-nice.691
Author: nice
Time: 27 September 2013, 2:05:45.131 am
UUID: e25c6256-260f-4f90-9826-bc204f8c6a30
Ancestors: Morphic-nice.690

Give some methods back the the (Multi)CharacterScanner

=============== Diff against Morphic-nice.690 ===============

Item was removed:
- ----- Method: CompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text') -----
- composeFrom: startIndex inRectangle: lineRectangle
- firstLine: firstLine leftSide: leftSide rightSide: rightSide
- "Answer an instance of TextLineInterval that represents the next line in the paragraph."
- | runLength stopCondition |
- "Set up margins"
- leftMargin := lineRectangle left.
- leftSide ifTrue: [leftMargin := leftMargin +
- (firstLine ifTrue: [textStyle firstIndent]
- ifFalse: [textStyle restIndent])].
- destX := spaceX := leftMargin.
- rightMargin := lineRectangle right.
- rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent].
- lastIndex := startIndex. "scanning sets last index"
- destY := lineRectangle top.
- lineHeight := baseline := 0.  "Will be increased by setFont"
- line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)
- rectangle: lineRectangle.
- self setStopConditions. "also sets font"
- runLength := text runLengthFor: startIndex.
- runStopIndex := (lastIndex := startIndex) + (runLength - 1).
- spaceCount := 0.
- self handleIndentation.
- leftMargin := destX.
- line leftMargin: leftMargin.
-
- [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex
- in: text string rightX: rightMargin stopConditions: stopConditions
- kern: kern.
- "See setStopConditions for stopping conditions for composing."
- (self perform: stopCondition)
- ifTrue: [^ line lineHeight: lineHeight + textStyle leading
- baseline: baseline + textStyle leading]] repeat!

Item was removed:
- ----- Method: MultiCompositionScanner>>composeFrom:inRectangle:firstLine:leftSide:rightSide: (in category '*Morphic-Text Support-scanning') -----
- composeFrom: startIndex inRectangle: lineRectangle
- firstLine: firstLine leftSide: leftSide rightSide: rightSide
- "Answer an instance of TextLineInterval that represents the next line in the paragraph."
- | runLength stopCondition |
- "Set up margins"
- leftMargin := lineRectangle left.
- leftSide ifTrue: [leftMargin := leftMargin +
- (firstLine ifTrue: [textStyle firstIndent]
- ifFalse: [textStyle restIndent])].
- destX := spaceX := leftMargin.
- firstDestX := destX.
- rightMargin := lineRectangle right.
- rightSide ifTrue: [rightMargin := rightMargin - textStyle rightIndent].
- lastIndex := startIndex. "scanning sets last index"
- destY := lineRectangle top.
- lineHeight := baseline := 0.  "Will be increased by setFont"
- self setStopConditions. "also sets font"
- runLength := text runLengthFor: startIndex.
- runStopIndex := (lastIndex := startIndex) + (runLength - 1).
- line := (TextLine start: lastIndex stop: 0 internalSpaces: 0 paddingWidth: 0)
- rectangle: lineRectangle.
- spaceCount := 0.
- self handleIndentation.
- leftMargin := destX.
- line leftMargin: leftMargin.
-
- [stopCondition := self scanCharactersFrom: lastIndex to: runStopIndex
- in: text string rightX: rightMargin stopConditions: stopConditions
- kern: kern.
- "See setStopConditions for stopping conditions for composing."
- self perform: stopCondition] whileFalse.
-
- ^ line
- lineHeight: lineHeight + textStyle leading
- baseline: baseline + textStyle leading!

Item was removed:
- ----- Method: MultiCompositionScanner>>setFont (in category '*Morphic-Multilingual') -----
- setFont
- super setFont.
- breakAtSpace := false.!


Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-nice.691.mcz

Frank Shearar-3
On 27 September 2013 01:06,  <[hidden email]> wrote:

> Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-nice.691.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-nice.691
> Author: nice
> Time: 27 September 2013, 2:05:45.131 am
> UUID: e25c6256-260f-4f90-9826-bc204f8c6a30
> Ancestors: Morphic-nice.690
>
> Give some methods back the the (Multi)CharacterScanner
>
> =============== Diff against Morphic-nice.690 ===============

I'm the first to admit that my recategorising of methods is sometimes
rather arbitrary, in my work on decoupling packages. It's work running
the PackageDependencyTest when making these changes, so that we don't
start re-adding cycles.

For instance, one of the recent changes (not sure which (*)) has added
a System -> Installer-Core dependency through referencing Installer.

(*) Diff http://build.squeak.org/job/SqueakTrunk/539/artifact/target/TrunkImage.manifest
and http://build.squeak.org/job/SqueakTrunk/540/artifact/target/TrunkImage.manifest
and you'll see the package suspects.

frank

Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-nice.691.mcz

Nicolas Cellier
In fact I think that TextComposer was formerly in Morphic, so that would explain why you once needed to break the dependecy.
But you then resolved the problem by moving TextComposer to Graphics.
So this left over the methods using TextComposer in Morphic...
It doesn't matter that much, we can have several trials and errors to improve the system...
...it's just that changing core code that might block the UI is more challenging when it is spanning several package (w.r.t. load order etc...)


2013/9/27 Frank Shearar <[hidden email]>
On 27 September 2013 01:06,  <[hidden email]> wrote:
> Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
> http://source.squeak.org/trunk/Morphic-nice.691.mcz
>
> ==================== Summary ====================
>
> Name: Morphic-nice.691
> Author: nice
> Time: 27 September 2013, 2:05:45.131 am
> UUID: e25c6256-260f-4f90-9826-bc204f8c6a30
> Ancestors: Morphic-nice.690
>
> Give some methods back the the (Multi)CharacterScanner
>
> =============== Diff against Morphic-nice.690 ===============

I'm the first to admit that my recategorising of methods is sometimes
rather arbitrary, in my work on decoupling packages. It's work running
the PackageDependencyTest when making these changes, so that we don't
start re-adding cycles.

For instance, one of the recent changes (not sure which (*)) has added
a System -> Installer-Core dependency through referencing Installer.

(*) Diff http://build.squeak.org/job/SqueakTrunk/539/artifact/target/TrunkImage.manifest
and http://build.squeak.org/job/SqueakTrunk/540/artifact/target/TrunkImage.manifest
and you'll see the package suspects.

frank




Reply | Threaded
Open this post in threaded view
|

Re: The Trunk: Morphic-nice.691.mcz

Frank Shearar-3
Absolutely. I'm certainly not trying to say "stop!". Just pointing out
that package dependencies are important, and need to be tightly
controlled (especially given the crazy hairball dependency graph that
we currently have).

frank

On 27 September 2013 12:00, Nicolas Cellier
<[hidden email]> wrote:

> In fact I think that TextComposer was formerly in Morphic, so that would
> explain why you once needed to break the dependecy.
> But you then resolved the problem by moving TextComposer to Graphics.
> So this left over the methods using TextComposer in Morphic...
> It doesn't matter that much, we can have several trials and errors to
> improve the system...
> ...it's just that changing core code that might block the UI is more
> challenging when it is spanning several package (w.r.t. load order etc...)
>
>
> 2013/9/27 Frank Shearar <[hidden email]>
>>
>> On 27 September 2013 01:06,  <[hidden email]> wrote:
>> > Nicolas Cellier uploaded a new version of Morphic to project The Trunk:
>> > http://source.squeak.org/trunk/Morphic-nice.691.mcz
>> >
>> > ==================== Summary ====================
>> >
>> > Name: Morphic-nice.691
>> > Author: nice
>> > Time: 27 September 2013, 2:05:45.131 am
>> > UUID: e25c6256-260f-4f90-9826-bc204f8c6a30
>> > Ancestors: Morphic-nice.690
>> >
>> > Give some methods back the the (Multi)CharacterScanner
>> >
>> > =============== Diff against Morphic-nice.690 ===============
>>
>> I'm the first to admit that my recategorising of methods is sometimes
>> rather arbitrary, in my work on decoupling packages. It's work running
>> the PackageDependencyTest when making these changes, so that we don't
>> start re-adding cycles.
>>
>> For instance, one of the recent changes (not sure which (*)) has added
>> a System -> Installer-Core dependency through referencing Installer.
>>
>> (*) Diff
>> http://build.squeak.org/job/SqueakTrunk/539/artifact/target/TrunkImage.manifest
>> and
>> http://build.squeak.org/job/SqueakTrunk/540/artifact/target/TrunkImage.manifest
>> and you'll see the package suspects.
>>
>> frank
>>
>
>
>
>