Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

In this Discussion

SyntaxEdit Live Spelling Bug

When using Addict 'live spelling' with SyntaxEdit, sometimes squiggly red lines for misspelled words will be drawn in the wrong place.

All you have to do is start with an empty document with live spelling enabled, type a bad word, and hit the space character. The squiggly red lines shows up several lines down in empty space (since the document only has one line, there is no line number for where it shows up).

Now the interesting thing is that it seems that if there is an empty 'line 2' and you are typing a misspelled word into line 1, then this problem doesn't happen... but take away the empty line 2 and the red squiggly line is drawn in the wrong place.

Please see screenshot (if I can get it to upload).... unfortunately it seems to get stuck on "uploading..."... but email me if you'd like me to send it to you.

Comments

  • 5 Comments sorted by Votes Date Added
  • Hi,

    I've checked everything, and, unfortunately, I can't find whats going wrong. 
    Here is my setup:

    I've made a simple app with syntax edit view on the main form. Edit document lines are set to single line, containing word 'Hoke' at design-time. The app has a button and it invokes the following code:

    AddictSpell1.AddControl(LMDEditView1);

    After starting the app, I press this button and log all edit related messages (sent by addict). Here is a log from Debug View util:

    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_GetFirstVisibleLine, R = 0
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_GetSel, R = (0,0)
    [5932] EM_GetFirstVisibleLine, R = 0
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_GetLine, R = 4
    [5932] EM_LineIndex.begin, L = 0
    [5932] EM_LineIndex.end, R = 0
    [5932] EM_LineIndex.begin, L = 0
    [5932] EM_LineIndex.end, R = 0
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_LineIndex.begin, L = 0
    [5932] EM_LineIndex.end, R = 0
    [5932] EM_PosFromChar, R = (72, 0)
    [5932] EM_LineIndex.begin, L = 1
    [5932] EM_LineIndex.end, R = -1
    [5932] EM_GetCharFormat
    [5932] EM_PosFromChar, R = (72, 0)
    [5932] EM_PosFromChar, R = (104, 0)
    [5932] EM_ExGetSel, R = (0,0)
    [5932] EM_PosFromChar, R = (72, 0)
    [5932] EM_PosFromChar, R = (104, 0)
    [5932] EM_LineIndex.begin, L = 1
    [5932] EM_LineIndex.end, R = -1

    So, I see nothing wrong in these messages?... All messages report correct values as a result, so I don't know what is the problem.
  • edited November 2013 Posts: 192Vote Up0Vote Down
    So you were able to reproduce the problem but don't know what's wrong?

    Or were you not able to reproduce the problem? I can provide more info if that's the case.
  • I can reproduce the problem, but don't know what's wrong. 

    Addict has no well defined interface for third-party controls, and all interaction is happens using Windows EDIT specific messages. We implemented handlers of these messages. And all of them seems to work well. Specifically, having one line of text in the edit, messages never report more than one line. So, I don't know why addict draw red lines at the bottom of the view.

    However, note that additct draw red lines exactly near the view bottom; that is, if you'll resize the view red lines will be shifted correspondingly. This make me think that may be addict perform some optimization for single line EDIT.
  • Thanks. I'll let the Addict guys know.
Sign In or Register to comment.