Hi guys.
I'm happy to announce that new text editor based on new text model done. You can load configuration from http://www.smalltalkhub.com/#!/~sig/TxText. Last version: 0.6. See class side example methods. What available now in TxTextMorph: - cursor navigation with move left, right, down, up and mouse click - text selection with move left, right, down, up and mouse movement - editing by keyboard input - text wrap - #addCursor/#removeCursor - #enableSelection. - #beEditable - all keyboard interractions based on shortcuts Little details about navigation and editing: There is TxEditor object which know about cursor position and text selection. Text morph ask him to perform all navigation and editing behaviour. It has cursorMode which knows how to change editor selection when cursor moved. Editor delegates all move actions to cursorPosition by #doesNotUnderstand method. It is simplified adding new navigation methods. For example see TxTextMorph>>enableSelection aTxTextMorph>>moveEditorOn: Character arrowLeft by: #moveLeft. This expression adds two shortcuts: to move editor left and to select text left (when selectionModeModifier active).What next: - Remains standart navigation and editing features like copy/paste, move to line end, to text end and etc. - halo menu items to edit text and layout properties - Edit decorators to get mask behaviour like "(999)***-**-**", pretty numbers like "1'000'000", secrete field like "***" - Value specs to filter inserted text (only numbers, only english and etc) There are some problems with focus behaviour now. And drawing text morph with transparent back color works bad. It will be cool if somebody with good knowledge at this topics can fix it. Best regards, Denis |
Hi Denis,
On 26 Apr 2013, at 23:19, Denis Kudriashov <[hidden email]> wrote: > I'm happy to announce that new text editor based on new text model done. You can load configuration fromhttp://www.smalltalkhub.com/#!/~sig/TxText. Last version: 0.6. > See class side example methods. Impressive & cool ! But how do I actually run any of this code, apart from the tests ? Sven -- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill |
Hi
2013/4/27 Sven Van Caekenberghe <[hidden email]> Hi Denis, I am not understrand what you want. All tests are runnable as usual from test runner or browser. I not wrote test which opens text morph on some text. Example class side methods should be executed manually
|
On 27 Apr 2013, at 10:02, Denis Kudriashov <[hidden email]> wrote: > Hi > > 2013/4/27 Sven Van Caekenberghe <[hidden email]> > Hi Denis, > > On 26 Apr 2013, at 23:19, Denis Kudriashov <[hidden email]> wrote: > > > I'm happy to announce that new text editor based on new text model done. You can load configuration fromhttp://www.smalltalkhub.com/#!/~sig/TxText. Last version: 0.6. > > See class side example methods. > > Impressive & cool ! > > But how do I actually run any of this code, apart from the tests ? > > I am not understrand what you want. All tests are runnable as usual from test runner or browser. > I not wrote test which opens text morph on some text. Example class side methods should be executed manually I am sorry, I just can't find any class side example code in the Tx packages/classes. Maybe I am looking in the wrong place. Can't you give an actual class where I should look or an executable code snippet ? Thx, Sven |
2013/4/27 Sven Van Caekenberghe <[hidden email]>
Sorry about it too. It was deep night when I push ann. TxTextMorph has class side example methods to see how it can be used.
|
In reply to this post by Denis Kudriashov
Nice!
Denis did you see the benchs that doru tried to see if we can use Rubric? Because it is interesting to see if we can load and manipulate really large file. Now it would be good that alain releases Rubric with a stable version and check how to take advantage of the new TextMorph. Stef On Apr 26, 2013, at 11:19 PM, Denis Kudriashov <[hidden email]> wrote: Hi guys. |
In reply to this post by Denis Kudriashov
2013/4/27 Denis Kudriashov <[hidden email]>
This examples based on #newTextContents: method which clean current text model and insert new string to it. If you want to edit and show multy styled text you should create TxModel instance manuallly and put it to morph by #textModel: To see how create text models looks at TxModelTests
|
In reply to this post by Denis Kudriashov
On 27 Apr 2013, at 10:11, Denis Kudriashov <[hidden email]> wrote: > 2013/4/27 Sven Van Caekenberghe <[hidden email]> > > On 27 Apr 2013, at 10:02, Denis Kudriashov <[hidden email]> wrote: > > > Hi > > > > 2013/4/27 Sven Van Caekenberghe <[hidden email]> > > Hi Denis, > > > > On 26 Apr 2013, at 23:19, Denis Kudriashov <[hidden email]> wrote: > > > > > I'm happy to announce that new text editor based on new text model done. You can load configuration fromhttp://www.smalltalkhub.com/#!/~sig/TxText. Last version: 0.6. > > > See class side example methods. > > > > Impressive & cool ! > > > > But how do I actually run any of this code, apart from the tests ? > > > > I am not understrand what you want. All tests are runnable as usual from test runner or browser. > > I not wrote test which opens text morph on some text. Example class side methods should be executed manually > > I am sorry, I just can't find any class side example code in the Tx packages/classes. Maybe I am looking in the wrong place. Can't you give an actual class where I should look or an executable code snippet ? > > Sorry about it too. It was deep night when I push ann. > TxTextMorph has class side example methods to see how it can be used. Aah, I loaded the Tests group assuming that that would have loaded everything, but it didn't: I was missing the actual UI classes in TxtText-UI ! Now I found them, with class comments and examples: much better for a noob like me ;-) Sven |
In reply to this post by stephane ducasse
2013/4/27 stephane ducasse <[hidden email]>
I saw his post. And just now I check this test with TxTextMorph with unwrapped strategy. Similar results like at Rubric test. nearly 30 secs. I generate 50 mb string with almost million lines: TxModel building get 10 seconds. Layout building get 20 seconds. If you want repeat this test you should not use #newTextContents: method. You should build text model manually and put it at morph by #textModel:. #newTextContents: method should be optimized. When I try test with #newTextContents: it was hang on very long time and I stop it.
|
2013/4/27 Denis Kudriashov <[hidden email]>
And now text editing has no optimization. After each edit full text layout rebuilt. So pressing some character in our test take another 20 seconds. It should be just fixed
|
In reply to this post by Denis Kudriashov
On 27 avr. 2013, at 12:39, Denis Kudriashov <[hidden email]> wrote: > 2013/4/27 stephane ducasse <[hidden email]> > Nice! > Denis did you see the benchs that doru tried to see if we can use Rubric? > Because it is interesting to see if we can load and manipulate really large file. > > Now it would be good that alain releases Rubric with a stable version and check how to take advantage of the new TextMorph. > > I saw his post. > And just now I check this test with TxTextMorph with unwrapped strategy. Similar results like at Rubric test. nearly 30 secs. > I generate 50 mb string with almost million lines: > TxModel building get 10 seconds. Layout building get 20 seconds. I will have a look. Thanks Alain > > If you want repeat this test you should not use #newTextContents: method. You should build text model manually and put it at morph by #textModel:. > #newTextContents: method should be optimized. When I try test with #newTextContents: it was hang on very long time and I stop it. > > > Stef > > On Apr 26, 2013, at 11:19 PM, Denis Kudriashov <[hidden email]> wrote: |
In reply to this post by Denis Kudriashov
2013/4/27 Denis Kudriashov <[hidden email]>
I found that Tudor wrote about 15 million lines. So I change my test and now I have OutOfMemotyWarning. It raised on splitting given string on lines. Obviously building text model should be optimized by work with stream. |
Thanks for your energy, alain told me that he will also have a look.
This is good to see movement from this front.
Having a scalable texteditor with rich editing capabilities (icons, line number) is important for Moose and synectique. Also the new generation code browser will benefit from this new TextMorph. Stef On Apr 27, 2013, at 12:54 PM, Denis Kudriashov <[hidden email]> wrote:
|
In reply to this post by Denis Kudriashov
With wrapping mode layout building take 27 seconds which is not too much than without wrapping. But it get 3.5 times more layout lines. (230 000 lines without wrapping and 750 000 with wrapping in my test)
2013/4/27 Denis Kudriashov <[hidden email]>
|
In reply to this post by Denis Kudriashov
2013/4/27 Denis Kudriashov <[hidden email]>
And #drawOn: method should be optimized too. I think it is not difficult task. Now each line try to draw on canvas. But morph should draw only visible lines
|
2013/4/27 Denis Kudriashov <[hidden email]>
Drawing fixed. I upload new TxText-Layout version
|
Very impressive progress, Denis! :)
I going to finish low-level stuff in Athens (path approximation / point location) and then go straight to text rendering with existing Text. Next stage will be to take TxText model and provide rendering for it with Athens, as well as review the code. About text editing and re-layout. It should be possible that any local update (which affecting only single character span or multiple adjusted character spans will require only local recalculations of text layout). Otherwise there is no reason why in our model we don't keep whole text in single big buffer (like Text does). Splitting text on multiple spans was the reason to make local layout updates possible. But i know it is not that easy to do :) -- Best regards, Igor Stasenko. |
Administrator
|
In reply to this post by Denis Kudriashov
For the recreationally-inclined, like myself ;) Gofer it url: 'http://www.smalltalkhub.com/#!/~sig/TxText'; package: 'ConfigurationOfTxText'; load. ((Smalltalk at: #ConfigurationOfTxText) project version: '0.6') load: #('ALL').
Cheers,
Sean |
Administrator
|
In reply to this post by Denis Kudriashov
OMG, TxTextMorph can grow horizontally. You're my new best friend :)
Cheers,
Sean |
In reply to this post by Igor Stasenko
I should say it is not difficult to do with current design. I were
think about it and current layout building logic requires little changes, maybe just one spesific method. But there is cases where any text change required rebuilding full layout. Fo example, single line text with wrapping mode. 2013/4/27, Igor Stasenko <[hidden email]>: > Very impressive progress, Denis! :) > > I going to finish low-level stuff in Athens (path approximation / > point location) > and then go straight to text rendering with existing Text. > Next stage will be to take TxText model and provide rendering for it > with Athens, > as well as review the code. > > About text editing and re-layout. > It should be possible that any local update (which affecting only > single character span or multiple adjusted character spans will > require only local recalculations of text layout). Otherwise there is > no reason why in our model we don't keep whole text in single big > buffer (like Text does). > Splitting text on multiple spans was the reason to make local layout > updates possible. > But i know it is not that easy to do :) > > > -- > Best regards, > Igor Stasenko. > > |
Free forum by Nabble | Edit this page |