ScintillaNET icon indicating copy to clipboard operation
ScintillaNET copied to clipboard

64 bit 'Lines' count problem

Open p4spares opened this issue 5 years ago • 3 comments

hi, i'm trying to use ScintillaNet on a 64 bit application, this way:

        scintilla = new ScintillaNET.Scintilla();
        scintilla.Dock = DockStyle.Fill;
        panel1.Controls.Add(scintilla);

        scintilla.Text = "aaaa\nbbbbb\n";

        int n = scintilla.Lines.Count;

on 64 bit i get 1 as result of the Lines.Count, wrong. on 32 bit, i get 3, correct.

i did some debugging and i found out the events in scintilla_SCNotification are not the same in 32/64bit.

thanks, Davide

p4spares avatar Jul 17 '20 08:07 p4spares

Perhaps there is some kind of a layout thing happening, since you are doing all at once. I tried with 32, 64 and Any CPU with prefer 32-bit on/off and the result was always correct but the line count is taken in a button click event: image

VPKSoft avatar Jul 18 '20 06:07 VPKSoft

hi, here is my settings for compile scintillanet: image and for my demo application: image both are forced to 64 bit for avoid different behaviours. as i remember i also changed target framework to 4.8 as required by the application im working on. over weekend i plan to retry from scratch. David

p4spares avatar Jul 18 '20 07:07 p4spares

I had the same problem. It appeared to be due to type changes in the SCNotification struct. Implementing Update types in the SCNotification struct #447, solved the Lines.Count problem in 64-bit builds.

i100yanov avatar Jan 20 '23 07:01 i100yanov