Hi all,
I like to implement a keyboard shortcut for, while editing any text, move the text pointer to the next position after $: . Seems that the base of all text editing is the class #TextMorphForEditView. I see there there is an instance variable for the text. My problem is i can not find a method that tells/sets the current position in the text of the text pointer. I've tried going through the list of methods of #TextMorphForEditView and its superclasses. Also through the one of senders of #arrowRight trying to find the instantiation of #KMKeyCombination needed to implement the existing shortcut "ctrl + right arrow" which jumps to the next position after an space, but i found nothing. Best, Laura |
2015-01-29 23:06 GMT+01:00 Laura Risani <[hidden email]>:
Hello Laura, not all editing functions are actually in the TextMorph (TextMorphForEditView ...) classes or the Text class, instead they delegated this to an editor class (Editor/SimpleEditor/SmalltalkEditor...). And - yes that is bad - not all keyboard shortcuts go through KMKeyCombination and KMKeymap. The SmalltalkEditor class defines its own shortcut handler. For exampe: cmd+shift+a -> #argAdvance: This method searches for the next $: followed by a space and place the caret after the space. nicolai |
Hi Nicolai, Thank for your answer, it was excellent! It is nice to know that the editing functions are MVC way separated. :) On Thu, Jan 29, 2015 at 8:48 PM, Nicolai Hess <[hidden email]> wrote:
|
In reply to this post by Nicolai Hess
Yes we should continue to remove the old key-bindings hard-coded.
Stef Le 30/1/15 00:48, Nicolai Hess a
écrit :
|
Rubric is already in the image and has most of these keybindings properly defined. Doru On Fri, Jan 30, 2015 at 11:09 AM, stepharo <[hidden email]> wrote:
|
Can Rubric be used for displaying paragraphs etc ? I want to improve the documentation situation for pharo by improving the help tool. Nothing major just something that will improve the general look. Shortucts also play a huge role in this, I really like Emacs documentation system that allow you to navigate via shortcuts . On Fri, Jan 30, 2015 at 12:13 PM, Tudor Girba <[hidden email]> wrote:
|
Rubric is basically a clone of TextMorph that was significantly refactored by Alain. Just keep in mind that Rubric is just a bridge solution. The goal is to adopt TxText as soon as possible. Cheers, Doru On Fri, Jan 30, 2015 at 11:23 AM, kilon alios <[hidden email]> wrote:
|
Ok thanks that means I will wait for TxText too, I am in no big hurry. Well unless TxText takes more than a year to be added to Pharo. On Fri, Jan 30, 2015 at 12:37 PM, Tudor Girba <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |