Cool :) We really need to kill this ugly monster, and make it turn into a nice butterfly for 3.0 :)
Just a tiny question: Shouldn't the code belong to RMoD team instead of Igor on SmalltalkHub ? Ben On Feb 6, 2013, at 3:56 PM, Igor Stasenko <[email protected]> wrote: > Hi, today, me, Tristan and Camillo took some overview on existing > code and discussed further steps. > > TxAttributes > 'contents' should be private (no getter/setter) > > because if you can directly manipulate the underlying collection, then > what is the point of having separate class? > > Text Attributes in general: > > - we discussed and decided that it would be better that model will > keep abstract attributes for text , like > - bold > - italic > - font family name > > the view then can compute the real font to use, but model don't have > to deal with real font(s). > > This will imply having more complex attribute(s): you will be forced > to visit them all to determine all of the font properties > of a final font to use. > > The attributes in span should behave like a set (you cannot apply same > attribute once), > and hence implement #= and #hash properly. > > Also, i think, since neither bold, nor italic attributes don't need to > be represented by multiple instances of same class, > we could use convenience methods (by introducing them) in TxAttribute > class to get a singletons for those ones, e.g.: > > selection applyAttribute: TxAttribute bold > > Layout: > - right now, when you do layout it will split spans of txmodel. Which > should not happen. > > We discussed about it and agreed that layouts(views) should not modify > anything in text model. > Instead the information about where line has to be split (like when > you need to wrap a text) should be kept > separately by a view. > > We thought that it would be nicer to implement a new span type > (layoutspan), which will hold > an text-interval (pos1, pos2) and probably any additional information > (like caching the width/height) > to not recalculate this stuff if nothing changed in model. > > > We did some cosmetic changes to configuration.. to merge Tristan's > code into it and load most recent packages: > > Gofer it > smalltalkhubUser: 'sig' project: 'TxText'; > package: 'ConfigurationOfTxText'; > load. > > (ConfigurationOfTxText project version: '0.3') load: 'Tests' > > -- > Best regards, > Igor Stasenko. >
