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 <[email protected]> wrote: > > 2015-01-29 23:06 GMT+01:00 Laura Risani <[email protected]>: > >> 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 >> > > 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 > >
