At first I thought that TextMorph>>cursor would return me the position of the cursor relative to its text so if I have a text like "hello" and cursor (that blinking thing) was at "o" it would return 6 but no, whatever position I try it returns always 1 . With rubric I found no way to do this either. Anyone has a clue, or to I need some kind of pharo dark magic ? Is this a bug , a feature or something in between ? |
and to answer my own question the answer is TextMorph editor pointIndex.On Wed, Nov 11, 2015 at 3:21 PM Dimitris Chloupis <[hidden email]> wrote:
|
Hello Dimitris,
Why do you use TextMorph and not RubScrolledTextModel or RubTextFieldMorph ? Cheers Alain
|
because its simpler to understand and because I made it work the way I wanted faster than the Rubric alternatives. For example finding the cursor position for a RubScrolledTextMorph is even worse and is located at textArea selectionInterval which I did not even find by myself because the name would never have me guessed that selection had anything to do with cursor position. But I was told so by another smalltalker at slack chat. On Wed, Nov 11, 2015 at 7:30 PM Alain Plantec via Pharo-users <[hidden email]> wrote:
|
Free forum by Nabble | Edit this page |