Page 2 of 5

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Wed Dec 05, 2018 7:33 pm
by srod
A few bugs I'm afraid.

Hit 'enter' in the middle of a line and then hit backspace a couple of times. Doesn't work the way it should.

Cursor to the end of a line and insert a couple of characters. Sometimes it works fine, other times the first character is prepended to the next line and the second character is added elsewhere!

Undo doesn't seem to work unless I am missing something?

PB 5.70 LTSx64 beta 3.

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Wed Dec 05, 2018 10:17 pm
by Thorsten1867
Apparently the invisible control characters for the line break caused the problems.
I hope it works better now.

An Undo is created after pressing the Space key for the previous word.

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Thu Dec 06, 2018 10:32 am
by srod
Yes, better! :)

However, cursor to the middle of a line, hit return and then backspace. An additional space is inserted. Hit return twice, 2 spaces inserted!

Still can't get undo/redo to work in any 'sensible' way. Seems to undo one action and no more.

Re: [Module] EditorEx (Custom Editor Gadget) [Beta]

Posted: Sun Dec 09, 2018 9:07 pm
by Thorsten1867

Code: Select all

[09/12/18] Scroll and drawing routines completely revised & flashing cursor & mouse wheel & Shortcuts added & Bugfixes
Please test!

Here is a list of the currently available shortcuts:

Code: Select all

; Home         - Move cursor to start of row
; End          - Move cursor to end of row
; Shft-Del     - Cut & copy selected text to clipboard
; Shft-Insert  - Paste clipboard at cursor position
; Crtl-A       - Select all
; Crtl-C       - Copy selected text to clipboard
; Crtl-D       - Delete selected text
; Crtl-V       - Paste clipboard at cursor position
; Crtl-X       - Cut & copy selected text to clipboard
; Ctrl-Z       - Perform Undo
; Ctrl-End     - Move the cursor to the end of the last row
; Ctrl-Down    - Move the cursor to the beginning of the next paragraph
; Ctrl-Home    - Move the cursor to the beginning of the first row
; Crtl-Insert  - Copy selected text to clipboard 
; Crtl-Left    - Move the cursor to the beginning of the previous word
; Crtl-Minus   - Insert at cursor position a 'Soft-Hyphen'
; Crtl-Right   - Move the cursor to the beginning of the next word.
; Crtl-Up      - Move the cursor to the beginning of the previous paragraph.

Re: [Module] EditorEx (Custom Editor Gadget) [Beta]

Posted: Mon Dec 10, 2018 1:03 pm
by mestnyi
invalid memory access
3125 line

Code: Select all

Edit()\Text\Space  = Font()\Char(" ")

Re: [Module] EditorEx (Custom Editor Gadget) [Beta]

Posted: Tue Dec 11, 2018 6:53 pm
by Thorsten1867

Code: Select all

[11/12/18] Fixed fundamental problem in selection & Bugfixes

Re: [Module] EditorEx (Custom Editor Gadget) [Beta]

Posted: Wed Dec 12, 2018 11:26 am
by Thorsten1867

Code: Select all

[12/12/18] Automatic spell checking & Bugfixes
I have tried to implement this as resource-efficiently as possible.

On the one hand, a check is only carried out if there is an empty or punctuation character and on the other hand, each word (even if there are several gadgets) is only checked once against the dictionary until the program is finished.

Re: [Module] EditorEx (Custom Editor Gadget) [Beta]

Posted: Mon Apr 01, 2019 5:42 am
by Cyllceaux
How about a DPI-Version? :wink:

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Thu Apr 04, 2019 6:36 pm
by Thorsten1867
Update:
  • Modules completely revised (selection/cursor handling)
  • DPI - compliant
Possibly there are still hidden problems with DPI that I haven't discovered yet.

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Mon Apr 08, 2019 3:00 am
by Cyllceaux
works for me :D

OH... Line 5259... Why CompilerElseIf?

thx

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Sun Sep 01, 2019 8:57 pm
by davido
@Thorsten1867,
I downloaded the latest version. On Windows 10 it looks fine.
However, I noticed a minor problem on my Macbook:
On a new line I entered 4
The cursor appeared to be 1 pixel after the character: 4|
Upon entering another 4 the cursor was now on the last pixel of the last 4
After a few entries the line looked: 444444|4

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Thu Oct 03, 2019 10:16 am
by Thorsten1867
After the cursor caused some trouble again and again, I now follow a new approach and have completely reworked the module.
Instead of splitting the text into lines using wordwrap, I now work with "virtual" lines, i.e. these are only one position with a certain length in the text string.
In addition, the text is no longer drawn line by line, but word by word, which allows a seamless integration of WordWarp, hyphenation and syntax highlighting.
After I stumbled across the "Damerau-Levenshtein-Distance" some time ago, there are now suggestions for correcting misspelled words.

Update:
  • New: Completely revised with a new approach to text handling
  • Added: Correction suggestions for spell-checking (right click on wrong (red) words)
  • Added: Right douple click: spell-checking of the word and, if necessary, correction suggestions
  • Added: CountItems()
  • Bugfix: SetText()

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Thu Oct 03, 2019 11:20 am
by mestnyi
this does not work in mac os

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Thu Oct 03, 2019 11:45 am
by mk-soft
There is a small bug in the InputHandler

Change Line 2888

Code: Select all

    If FindMapElement(EditEx(), Str(GNum))
      
      If EditEx()\Flags & #ReadOnly = #False

P.S.
I change BackColor...
Line 4459

Code: Select all

          ;EditEx()\Color\Back          = BlendColor_(OSX_NSColorToRGB(CocoaMessage(0, 0, "NSColor textBackgroundColor")), $FFFFFF, 90)
          EditEx()\Color\Back          = BlendColor_(OSX_NSColorToRGB(CocoaMessage(0, 0, "NSColor textBackgroundColor")), $FFFFFF, 97)

Re: [Module] EditorEx (Custom Editor Gadget)

Posted: Thu Oct 03, 2019 1:15 pm
by Thorsten1867
Bug fixed