[Pharo-project] [Ann] TxText. New text editor done!
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 <dionisiydk@gmail.com> 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 <sven@stfx.eu>
Hi Denis,
On 26 Apr 2013, at 23:19, Denis Kudriashov <dionisiydk@gmail.com> 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
Sven
-- Sven Van Caekenberghe http://stfx.eu Smalltalk is the Red Pill
On 27 Apr 2013, at 10:02, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi
2013/4/27 Sven Van Caekenberghe <sven@stfx.eu> Hi Denis,
On 26 Apr 2013, at 23:19, Denis Kudriashov <dionisiydk@gmail.com> 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 <sven@stfx.eu>
On 27 Apr 2013, at 10:02, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi
2013/4/27 Sven Van Caekenberghe <sven@stfx.eu> Hi Denis,
On 26 Apr 2013, at 23:19, Denis Kudriashov <dionisiydk@gmail.com> 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.
Thx,
Sven
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 Sven Van Caekenberghe <sven@stfx.eu>
On 27 Apr 2013, at 10:02, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi
2013/4/27 Sven Van Caekenberghe <sven@stfx.eu> Hi Denis,
On 26 Apr 2013, at 23:19, Denis Kudriashov <dionisiydk@gmail.com> 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.
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
Thx,
Sven
On 27 Apr 2013, at 10:11, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/4/27 Sven Van Caekenberghe <sven@stfx.eu>
On 27 Apr 2013, at 10:02, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi
2013/4/27 Sven Van Caekenberghe <sven@stfx.eu> Hi Denis,
On 26 Apr 2013, at 23:19, Denis Kudriashov <dionisiydk@gmail.com> 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
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 <dionisiydk@gmail.com> wrote:
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
2013/4/27 stephane ducasse <stephane.ducasse@free.fr>
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.
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 <dionisiydk@gmail.com> wrote:
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
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 stephane ducasse <stephane.ducasse@free.fr>
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.
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.
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
Stef
On Apr 26, 2013, at 11:19 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
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
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 stephane ducasse <stephane.ducasse@free.fr>
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.
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.
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
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
Stef
On Apr 26, 2013, at 11:19 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
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
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 stephane ducasse <stephane.ducasse@free.fr>
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.
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.
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
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
Drawing fixed. I upload new TxText-Layout version
Stef
On Apr 26, 2013, at 11:19 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
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
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.
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 <siguctua@gmail.com>:
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.
Hi denis Alain is gone on vacation but it told me that if you code scale he will throw away what he did :) May be the decorators that alain wrote can be merged. In any case this is excellent to get a better system. Stef On Apr 27, 2013, at 5:17 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
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 <siguctua@gmail.com>:
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.
2013/4/28 stephane ducasse <stephane.ducasse@free.fr>
Hi denis
Alain is gone on vacation but it told me that if you code scale he will throw away what he did :) May be the decorators that alain wrote can be merged. In any case this is excellent to get a better system.
Yes. This is why I work on this project. But my first proposals was not make editor for large text. I actually not think about it at all. My main idea is make clean and extendible text editor. So anybody can understand how layout built, where text insertion happens, how it processed, how cursor wors and etc. I want text editor which is not required hacks to simple tasks like allow only numbers, hide cursor, disable text selection, make masked input, make smart completions and etc.
Stef
On Apr 27, 2013, at 5:17 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
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 <siguctua@gmail.com>:
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.
Denis Kudriashov wrote
My main idea is make clean and extendible text editor. So anybody can understand how layout built, where text insertion happens, how it processed, how cursor works and etc. I want text editor which is not required hacks to simple tasks like allow only numbers, hide cursor, disable text selection, make masked input, make smart completions and etc.
Amen, brother! ----- Cheers, Sean -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4684124.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
I upload new version 0.7: - clipboard operations - more navigation shortcuts - fixed bugs when editing text from start or end text positions - optimized text drawing to draw only visible lines - optimized TxInterval>>contains:. So now #newTextContents: works on big strings With this version I again investigate beautiful morphic events code (you should install slice 10427). I add shortcuts "Character end ctrl" and "Character home ctrl" to move cursor at text end and start. And it was not work. I debug what happens and KeyboardEvent from "Character home ctrl" was printed as ctrl+d. What's the crap! Ok I found this code: modifiedCharacter self flag: #hack. "Hack me. When Ctrl is pressed, the key ascii value is not right and we have to do something ugly" ^(self controlKeyPressed and: [ (#(MacOSX Windows) includes: Smalltalk os current platformFamily) and: [ keyValue <= 26 ]]) ifTrue: [ (self keyValue + $a asciiValue - 1) asCharacter ] ifFalse: [ self keyCharacter ] I don't know why such complicated code needed but with only "^self keyCharacter" you will replace many standart shortcuts with some random behaviour. So I just extract special logic to method and put here special checking for home and end characters: KeyboardEvent>>hasSpecialCTRLKeyValue " 4 - Character end 1 - Character home " ^ self controlKeyPressed and: [ keyValue <= 26 & (keyValue ~= 4) & (keyValue ~= 1) ] And I remove dublication in printing keyboard event. Slice with fix here https://pharo.fogbugz.com/default.asp?10427. Should I put it at configuration dependency? I read about new events system at pharo vision. Is new system will remove such hacks?
On 28 April 2013 19:47, Denis Kudriashov <dionisiydk@gmail.com> wrote:
I upload new version 0.7: - clipboard operations - more navigation shortcuts - fixed bugs when editing text from start or end text positions - optimized text drawing to draw only visible lines - optimized TxInterval>>contains:. So now #newTextContents: works on big strings
With this version I again investigate beautiful morphic events code (you should install slice 10427). I add shortcuts "Character end ctrl" and "Character home ctrl" to move cursor at text end and start. And it was not work. I debug what happens and KeyboardEvent from "Character home ctrl" was printed as ctrl+d. What's the crap! Ok I found this code:
modifiedCharacter self flag: #hack. "Hack me. When Ctrl is pressed, the key ascii value is not right and we have to do something ugly" ^(self controlKeyPressed and: [ (#(MacOSX Windows) includes: Smalltalk os current platformFamily) and: [ keyValue <= 26 ]]) ifTrue: [ (self keyValue + $a asciiValue - 1) asCharacter ] ifFalse: [ self keyCharacter ]
I don't know why such complicated code needed but with only "^self keyCharacter" you will replace many standart shortcuts with some random behaviour. So I just extract special logic to method and put here special checking for home and end characters:
KeyboardEvent>>hasSpecialCTRLKeyValue " 4 - Character end 1 - Character home "
^ self controlKeyPressed and: [ keyValue <= 26 & (keyValue ~= 4) & (keyValue ~= 1) ]
And I remove dublication in printing keyboard event.
Slice with fix here https://pharo.fogbugz.com/default.asp?10427. Should I put it at configuration dependency?
I read about new events system at pharo vision. Is new system will remove such hacks?
what other goal you think behind it? :) The reason why those things are still there, is because we simply don't have enough human power to address them. But we will get there. One by one. -- Best regards, Igor Stasenko.
On Apr 28, 2013, at 7:47 PM, Denis Kudriashov <dionisiydk@gmail.com> wrote:
I upload new version 0.7: - clipboard operations - more navigation shortcuts - fixed bugs when editing text from start or end text positions - optimized text drawing to draw only visible lines - optimized TxInterval>>contains:. So now #newTextContents: works on big strings
With this version I again investigate beautiful morphic events code (you should install slice 10427). I add shortcuts "Character end ctrl" and "Character home ctrl" to move cursor at text end and start. And it was not work. I debug what happens and KeyboardEvent from "Character home ctrl" was printed as ctrl+d. What's the crap! Ok I found this code:
modifiedCharacter self flag: #hack. "Hack me. When Ctrl is pressed, the key ascii value is not right and we have to do something ugly" ^(self controlKeyPressed and: [ (#(MacOSX Windows) includes: Smalltalk os current platformFamily) and: [ keyValue <= 26 ]]) ifTrue: [ (self keyValue + $a asciiValue - 1) asCharacter ] ifFalse: [ self keyCharacter ]
horrible! As igor said this is not that we do not want but we have to pay attention to our ressources.
I don't know why such complicated code needed but with only "^self keyCharacter" you will replace many standart shortcuts with some random behaviour. So I just extract special logic to method and put here special checking for home and end characters:
KeyboardEvent>>hasSpecialCTRLKeyValue " 4 - Character end 1 - Character home "
^ self controlKeyPressed and: [ keyValue <= 26 & (keyValue ~= 4) & (keyValue ~= 1) ]
And I remove dublication in printing keyboard event.
Slice with fix here https://pharo.fogbugz.com/default.asp?10427. Should I put it at configuration dependency?
I read about new events system at pharo vision. Is new system will remove such hacks?
Hi denis
Alain is gone on vacation but it told me that if you code scale he will throw away what he did :) May be the decorators that alain wrote can be merged. In any case this is excellent to get a better system.
Yes. This is why I work on this project. But my first proposals was not make editor for large text. I actually not think about it at all. My main idea is make clean and extendible text editor. So anybody can understand how layout built, where text insertion happens, how it processed, how cursor wors and etc. I want text editor which is not required hacks to simple tasks like allow only numbers, hide cursor, disable text selection, make masked input, make smart completions and etc.
Yes I like the idea. Now if our clients cannot use our tools then we will survive long :). And this is better for Pharo that we get rich :) Stef
Like that sound! #cash Le 28 avr. 2013 21:09, "stephane ducasse" <stephane.ducasse@free.fr> a écrit :
Hi denis
Alain is gone on vacation but it told me that if you code scale he will throw away what he did :) May be the decorators that alain wrote can be merged. In any case this is excellent to get a better system.
Yes. This is why I work on this project. But my first proposals was not make editor for large text. I actually not think about it at all. My main idea is make clean and extendible text editor. So anybody can understand how layout built, where text insertion happens, how it processed, how cursor wors and etc. I want text editor which is not required hacks to simple tasks like allow only numbers, hide cursor, disable text selection, make masked input, make smart completions and etc.
Yes I like the idea.
Now if our clients cannot use our tools then we will survive long :). And this is better for Pharo that we get rich :)
Stef
On 27 avr. 2013, at 12:39, Denis Kudriashov <dionisiydk@gmail.com> wrote:
2013/4/27 stephane ducasse <stephane.ducasse@free.fr> 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. impressive! 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 <dionisiydk@gmail.com> wrote:
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 stephane ducasse <stephane.ducasse@free.fr>
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 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 <dionisiydk@gmail.com> wrote:
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com> 2013/4/27 stephane ducasse <stephane.ducasse@free.fr> 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 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.
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 <dionisiydk@gmail.com>
2013/4/27 Denis Kudriashov <dionisiydk@gmail.com>
2013/4/27 stephane ducasse <stephane.ducasse@free.fr>
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 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.
Denis Kudriashov wrote
You can load configuration from http://www.smalltalkhub.com/#!/~sig/TxText.
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 -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4683987.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 27 April 2013 16:53, Sean P. DeNigris <sean@clipperadams.com> wrote:
Denis Kudriashov wrote
You can load configuration from http://www.smalltalkhub.com/#!/~sig/TxText.
For the recreationally-inclined, like myself ;) Gofer it url: 'http://www.smalltalkhub.com/#!/~sig/TxText'; package: 'ConfigurationOfTxText'; load.
for recreationally-inclined like yourself, i would change the url in above code to: http://www.smalltalkhub.com/mc/sig/TxText/main :)
((Smalltalk at: #ConfigurationOfTxText) project version: '0.6') load: #('ALL').
----- Cheers, Sean -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4683987.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
Tried to load in Pharo3.0 Latest update: #30068 Got MNU: Character>>asShortcut why it is not there? :((( On 28 April 2013 16:37, Igor Stasenko <siguctua@gmail.com> wrote:
On 27 April 2013 16:53, Sean P. DeNigris <sean@clipperadams.com> wrote:
Denis Kudriashov wrote
You can load configuration from http://www.smalltalkhub.com/#!/~sig/TxText.
For the recreationally-inclined, like myself ;) Gofer it url: 'http://www.smalltalkhub.com/#!/~sig/TxText'; package: 'ConfigurationOfTxText'; load.
for recreationally-inclined like yourself, i would change the url in above code to: http://www.smalltalkhub.com/mc/sig/TxText/main
:)
((Smalltalk at: #ConfigurationOfTxText) project version: '0.6') load: #('ALL').
----- Cheers, Sean -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4683987.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
On Apr 28, 2013, at 4:44 PM, Igor Stasenko <siguctua@gmail.com> wrote:
Tried to load in
Pharo3.0 Latest update: #30068
Got MNU: Character>>asShortcut
why it is not there? :(((
Very strange. it seems this removed them: Name: Keymapping-Shortcuts-GuillermoPolito.67 Author: GuillermoPolito Time: 24 March 2013, 11:20:45.259 pm UUID: 4a3b850b-93ed-40d7-a1f8-75ca5d805af9 Ancestors: Keymapping-Shortcuts-EstebanLorenzano.65 from 3.0
On 28 April 2013 16:51, Marcus Denker <marcus.denker@inria.fr> wrote:
On Apr 28, 2013, at 4:44 PM, Igor Stasenko <siguctua@gmail.com> wrote:
Tried to load in
Pharo3.0 Latest update: #30068
Got MNU: Character>>asShortcut
why it is not there? :(((
Very strange. it seems this removed them:
Name: Keymapping-Shortcuts-GuillermoPolito.67 Author: GuillermoPolito Time: 24 March 2013, 11:20:45.259 pm UUID: 4a3b850b-93ed-40d7-a1f8-75ca5d805af9 Ancestors: Keymapping-Shortcuts-EstebanLorenzano.65
from 3.0
that's strange.. if i understand, it was introduced not that far ago, and now removed again.. before even people get used to it :) -- Best regards, Igor Stasenko.
On Apr 28, 2013, at 4:54 PM, Igor Stasenko <siguctua@gmail.com> wrote:
On 28 April 2013 16:51, Marcus Denker <marcus.denker@inria.fr> wrote:
On Apr 28, 2013, at 4:44 PM, Igor Stasenko <siguctua@gmail.com> wrote:
Tried to load in
Pharo3.0 Latest update: #30068
Got MNU: Character>>asShortcut
why it is not there? :(((
Very strange. it seems this removed them:
Name: Keymapping-Shortcuts-GuillermoPolito.67 Author: GuillermoPolito Time: 24 March 2013, 11:20:45.259 pm UUID: 4a3b850b-93ed-40d7-a1f8-75ca5d805af9 Ancestors: Keymapping-Shortcuts-EstebanLorenzano.65
from 3.0
that's strange.. if i understand, it was introduced not that far ago, and now removed again.. before even people get used to it :)
I think something got wrongly integrated. Marcus
Okay.. got it in 2.0. WOW!!!! That's amazing!!!! A functional text editor... TxTextMorph exampleCenteredText I love you , Denis! :) (will leave hate for later, when i go & see how you implemented it ;) On 28 April 2013 16:44, Igor Stasenko <siguctua@gmail.com> wrote:
Tried to load in
Pharo3.0 Latest update: #30068
Got MNU: Character>>asShortcut
why it is not there? :(((
On 28 April 2013 16:37, Igor Stasenko <siguctua@gmail.com> wrote:
On 27 April 2013 16:53, Sean P. DeNigris <sean@clipperadams.com> wrote:
Denis Kudriashov wrote
You can load configuration from http://www.smalltalkhub.com/#!/~sig/TxText.
For the recreationally-inclined, like myself ;) Gofer it url: 'http://www.smalltalkhub.com/#!/~sig/TxText'; package: 'ConfigurationOfTxText'; load.
for recreationally-inclined like yourself, i would change the url in above code to: http://www.smalltalkhub.com/mc/sig/TxText/main
:)
((Smalltalk at: #ConfigurationOfTxText) project version: '0.6') load: #('ALL').
----- Cheers, Sean -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4683987.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
-- Best regards, Igor Stasenko.
OMG, TxTextMorph can grow horizontally. You're my new best friend :) ----- Cheers, Sean -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4683988.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Sean P. DeNigris wrote
You're my new best friend :)
The cursor is an actual Morph (TxCursorMorph) instead of magic conjured up my Paragraph!!! All my other friends are fired, they've never given me a present this nice :) Also, please add me to the repo. I have a small fix (TxCursorMorph should show cursorColor instead of defaultColor) ----- Cheers, Sean -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4683990.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
Hi 2013/4/27 Sean P. DeNigris <sean@clipperadams.com>
Sean P. DeNigris wrote
You're my new best friend :)
The cursor is an actual Morph (TxCursorMorph) instead of magic conjured up my Paragraph!!! All my other friends are fired, they've never given me a present this nice :)
:)
Also, please add me to the repo. I have a small fix (TxCursorMorph should show cursorColor instead of defaultColor)
I not have permissions for that. Igor can you add Sean as contributor? I were make another fixes and I added your find too.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4683990.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
On 28 April 2013 08:25, Denis Kudriashov <dionisiydk@gmail.com> wrote:
Hi
2013/4/27 Sean P. DeNigris <sean@clipperadams.com>
Sean P. DeNigris wrote
You're my new best friend :)
The cursor is an actual Morph (TxCursorMorph) instead of magic conjured up my Paragraph!!! All my other friends are fired, they've never given me a present this nice :)
:)
Also, please add me to the repo. I have a small fix (TxCursorMorph should show cursorColor instead of defaultColor)
I not have permissions for that. Igor can you add Sean as contributor?
Done!
I were make another fixes and I added your find too.
----- Cheers, Sean -- View this message in context: http://forum.world.st/Ann-TxText-New-text-editor-done-tp4683876p4683990.html Sent from the Pharo Smalltalk mailing list archive at Nabble.com.
-- Best regards, Igor Stasenko.
participants (8)
-
Denis Kudriashov -
Igor Stasenko -
Marcus Denker -
philippe.back@highoctane.be -
plantec -
Sean P. DeNigris -
stephane ducasse -
Sven Van Caekenberghe