On 03 May 2015, at 06:25, Sean P. DeNigris <sean@clipperadams.com> wrote:
Questions first: - TxModel class comment - "I don't provide a direct interface for mutating/editing my data (and this is a very important point). Instead I am modified using position(s) (TxTextPosition) and/or selection(s) (TxInterval/TxSelection), providing a rich protocol for various operations over text." That sounds intriguing, but why is that so significant?
I think itâs related to TxText focus on locality: since you want that every operation takes constant time you cannot provide operations that take indexes. Instead you use positions/cursors and intervals/selections because they know to which spans they correspond.
- TxForeColorAttribute - Why not TxFontColorAttribute? Is the fore/font distinction important?
Maybe itâs just to be symmetric with TxBackColorAttribute. IMO youâre right, TxBackgroundColorAttribute and TxFontColorAttribute are more intention revealing.
- TxXyzAttribute - can we remove the 'Attribute' from all but the base class? e.g. TxFontAttribute -> TxFont
Maybe. It would be more concise, but a TxFontAttibute is not a font, it just refers to a font.
- TxStyle - why both #at: and #get:?
I guess #get: is what you want almost all the time. We should check where #at: #at:ifAbsent: is used.
Then a bit of cleaning... Issue 15475: TxText Cleanup for Pharo 5.0 #2 https://pharo.fogbugz.com/default.asp?15475 - TxXyzMorphs - Push up #openInWindowWithString:, #openInWindowWithText:, and #text, which each had two materially-identical implementations - Clean examples - TxModel - enhance class comment - TxStyle - Enhance class comment - Clean #removeAll comment - TxTextStyle - Enhance class comment - Clean #addStyle: comment - Clean #extend:with: comment
Great!!
----- Cheers, Sean -- View this message in context: http://forum.world.st/TxText-More-Cleaning-and-Questions-tp4823894.html Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com.