Administrator
|
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? - TxForeColorAttribute - Why not TxFontColorAttribute? Is the fore/font distinction important? - TxXyzAttribute - can we remove the 'Attribute' from all but the base class? e.g. TxFontAttribute -> TxFont - TxStyle - why both #at: and #get:? 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
Cheers,
Sean |
Administrator
|
Oh I forgot these... - Why TxBasicSpan instead of just TxSpan? - TxModel has 4 nearly identical methods for selection - #newSelection, #select, #selectAll, and #selection. How do we pare that down?
Cheers,
Sean |
Administrator
|
In reply to this post by Sean P. DeNigris
Finally passed validation! Okay to include?
Cheers,
Sean |
In reply to this post by Sean P. DeNigris
> On 03 May 2015, at 06:25, Sean P. DeNigris <[hidden email]> 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. > |
In reply to this post by Sean P. DeNigris
> On 03 May 2015, at 06:27, Sean P. DeNigris <[hidden email]> wrote: > > Sean P. DeNigris wrote >> Questions first: > > Oh I forgot these... > - Why TxBasicSpan instead of just TxSpan? TxAbstractSpan? > - TxModel has 4 nearly identical methods for selection - #newSelection, > #select, #selectAll, and #selection. How do we pare that down? Yes all of them answer a selection that cover the whole text. So #selectAll sounds like a good name and the others could be deprecated. > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/TxText-More-Cleaning-and-Questions-tp4823894p4823895.html > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. > |
Administrator
|
In reply to this post by camille teruel
Thanks for the answers! I'll add them to the roadmap...
I guess it makes sense because the model can just provide generic operations that rely on the positions/intervals...
Cheers,
Sean |
Administrator
|
In reply to this post by Sean P. DeNigris
Now there are: - Issue 15475: TxText Cleanup for Pharo 5.0 #2 - Issue 15481: TxText Cleanup for Pharo 5.0 #3 Both have passed validation. They are almost entirely cleanups. The only slight API change is in #3 (with a semantic minor version bump to the config): - [ENH]: Remove TxModel>>#getAttribute:, which makes no sense - you must ask a span or position for an attribute, not a text - [ENH]: Rename TxModel>>#import: -> #replaceAllWith: Actually managing via config is pretty cool because I was able to easily build #3 on #2. So, if we like both, only #3 has to be integrated.
Cheers,
Sean |
Administrator
|
Okay to include? I'd like to resume cleaning but don't want to get too deep before some of this gets integrated...
Cheers,
Sean |
yes, I will do it now :)
> On 05 May 2015, at 13:22, Sean P. DeNigris <[hidden email]> wrote: > > Sean P. DeNigris wrote >> - Issue 15475: TxText Cleanup for Pharo 5.0 #2 > > Okay to include? I'd like to resume cleaning but don't want to get too deep > before some of this gets integrated... > > > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/TxText-More-Cleaning-and-Questions-tp4823894p4824535.html > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. > |
Administrator
|
Thanks for integrating :) Sorry! I listed the older issue by mistake. The latest is: Issue 15481: TxText Cleanup for Pharo 5.0 #3
Cheers,
Sean |
ha, I knew it.. ok, integrating :P
> On 05 May 2015, at 16:26, Sean P. DeNigris <[hidden email]> wrote: > > EstebanLM wrote >> yes, I will do it now :) >>>> - Issue 15475: TxText Cleanup for Pharo 5.0 #2 >>> Okay to include? I'd like to resume cleaning but don't want to get too >>> deep >>> before some of this gets integrated... > > Thanks for integrating :) > Sorry! I listed the older issue by mistake. The latest is: > Issue 15481: TxText Cleanup for Pharo 5.0 #3 > > > > ----- > Cheers, > Sean > -- > View this message in context: http://forum.world.st/TxText-More-Cleaning-and-Questions-tp4823894p4824626.html > Sent from the Pharo Smalltalk Developers mailing list archive at Nabble.com. > |
Free forum by Nabble | Edit this page |