Still getting black background and white highlighted text

Feb 19, 2008 at 4:43 PM
Edited Feb 19, 2008 at 4:57 PM
Hi,
I downloaded the 2.0 release again last night on my laptop(XP 32bit) and everything seemed good, today I downloaded it to my XP 64bit work station and I am getting the black background again if I make any changes to the controls properties. I have the the build set to x86 to force 32 bit but am still getting the black background. Seems there is something odd going on running the control on a 64bit workstation.
I have the VS 2005 on both laptop and workstation with all Service Packs and updates applied.

Anyone else run into this?

After I make a change to the properties (i.e. set usefont = true) I get this error:

Here is a screen shot: http://www.milwaukeesoft.com/scintilla_sshot2.png

Then the black background

Here is a screen shot: http://www.milwaukeesoft.com/scintilla_sshot.png

Thanks,

Tony
Feb 19, 2008 at 5:37 PM
Edited Feb 19, 2008 at 5:39 PM
Chris,
here is some more info on this.
I don't have my 32bit laptop to verify, but it seems on XP 64 when I make a change the properties or add a new control to a new project it's adding the following to the forms Designer.cs file (and this is what's causing all the problems):

this.sciDocument.Styles.BraceBad.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.sciDocument.Styles.BraceBad.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.BraceBad.IsChangeable = false;
this.sciDocument.Styles.BraceBad.IsVisible = false;
this.sciDocument.Styles.BraceBad.Size = 0F;
this.sciDocument.Styles.BraceLight.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.sciDocument.Styles.BraceLight.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.BraceLight.IsChangeable = false;
this.sciDocument.Styles.BraceLight.IsVisible = false;
this.sciDocument.Styles.BraceLight.Size = 0F;
this.sciDocument.Styles.CallTip.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.CallTip.IsChangeable = false;
this.sciDocument.Styles.CallTip.IsVisible = false;
this.sciDocument.Styles.ControlChar.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.sciDocument.Styles.ControlChar.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.ControlChar.IsChangeable = false;
this.sciDocument.Styles.ControlChar.IsVisible = false;
this.sciDocument.Styles.ControlChar.Size = 0F;
this.sciDocument.Styles.Default.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.sciDocument.Styles.Default.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.Default.IsChangeable = false;
this.sciDocument.Styles.Default.IsVisible = false;
this.sciDocument.Styles.Default.Size = 0F;
this.sciDocument.Styles.IndentGuide.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.sciDocument.Styles.IndentGuide.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.IndentGuide.IsChangeable = false;
this.sciDocument.Styles.IndentGuide.IsVisible = false;
this.sciDocument.Styles.IndentGuide.Size = 0F;
this.sciDocument.Styles.LastPredefined.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.sciDocument.Styles.LastPredefined.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.LastPredefined.IsChangeable = false;
this.sciDocument.Styles.LastPredefined.IsVisible = false;
this.sciDocument.Styles.LastPredefined.Size = 0F;
this.sciDocument.Styles.LineNumber.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.LineNumber.IsChangeable = false;
this.sciDocument.Styles.LineNumber.IsVisible = false;
this.sciDocument.Styles.LineNumber.Size = 0F;
this.sciDocument.Styles.Max.BackColor = System.Drawing.Color.FromArgb(((int)(((byte)(0)))), ((int)(((byte)(0)))), ((int)(((byte)(0)))));
this.sciDocument.Styles.Max.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.Max.IsChangeable = false;
this.sciDocument.Styles.Max.IsVisible = false;
this.sciDocument.Styles.Max.Size = 0F;
this.sciDocument.TabIndex = 0;
this.sciDocument.SavePointLeft += new System.EventHandler(this.sciDocument_SavePointLeft);
this.sciDocument.SavePointReached += new System.EventHandler(this.sciDocument_SavePointReached);


If I cut this out and then compile it starts working again, as soon as I modify the controls properties again it puts these lines back in and it goes back to the black background.

It also adds these lines on a new project when the control is dropped on a form.

Hope this helps you to figure out what is going on.

Later,

Tony
Coordinator
Feb 19, 2008 at 5:43 PM
I wish it did. Unfortunately without access to a 64 bit system to debug with this will be a very difficult thing. Do you have any ideas on that?
Feb 19, 2008 at 5:51 PM


ChrisRickard wrote:
I wish it did. Unfortunately without access to a 64 bit system to debug with this will be a very difficult thing. Do you have any ideas on that?


I guess your best bet would be to get a copy of XP or Vista 64 bit and run a virtual machine. it seems to work fine after I cut out the style lines it adds in the forms designer.cs file.

I could also let you remote control my 64bit workstation at home if you really wanted to figure this out. I have been looking in the code, but it's going to take me a long time to figure out where the problem is.

Later,

Tony
Coordinator
Feb 19, 2008 at 6:45 PM


tcaduto wrote:
I could also let you remote control my 64bit workstation at home if you really wanted to figure this out. I have been looking in the code, but it's going to take me a long time to figure out where the problem is.


I think I'll take you up on that offer. Can you please email me at rickard234@gmail.com?
Feb 19, 2008 at 7:34 PM
Chris,
here is another bit of info, it adds the styles stuff in the designer file even if I update some other control on the form.
I wonder if it's really related to 64bit or possibly the VS or .net SP?

here is what I am running:
Microsoft Visual Studio 2005
Version 8.0.50727.762 (SP.050727-7600)
Microsoft .NET Framework
Version 2.0.50727

Installed Edition: Professional



Microsoft Web Application Projects 2005
Version 8.0.50727.762

Crystal Reports AAC60-G0CSA4B-V7000AY
Crystal Reports for Visual Studio 2005


Microsoft Visual Studio 2005 Professional Edition - ENU Service Pack 1 (KB926601)
This service pack is for Microsoft Visual Studio 2005 Professional Edition - ENU.
If you later install a more recent service pack, this service pack will be uninstalled automatically.
For more information, visit http://support.microsoft.com/kb/926601
.

AnkhSVN
Please visit http://ankhsvn.tigris.org for more information

Below is the version information for the various AnkhSVN components
AnkhSVN 1.0.2.2778
OpenSSL 0.9.8a
Neon 0.25.5
ZLib 1.2.3
Berkeley DB 4.4.20
Subversion 1.4.5
Ankh 1.0.2Final
apr-iconv 0.9.7
apr-util 0.9.12
apr 0.9.12

Apr 22, 2008 at 1:16 AM
I'm having this same problem.

Directions to reproduce:
1. Get clean SCide project from source zip.
2. Open the Solution with VS 2005.
3. Build ScintillaNet project.
4. Open frmDocument.cs in designer
5. Add a PrintDialog (or any other control)
6. Rebuild the Solution.
7. Error occurs with text:
Code generateion for property 'FontName' failed. Error was: 'Property accessor 'FontName' on object 'ScintillaNet.Style' threw the following exception:'Non-negative number required.
Parameter name: count"
8. Click OK.
9. sciDocument control now has black background and a bunch of new properties were set by the code generator.

I hope this helps to narrow down the problem here it is really a pain to have to have to delete a bunch of lines from the designer.cs files when I add controls to my forms.

Let me know if you need any more information.

Thanks,
Justin
Apr 22, 2008 at 1:17 AM
I should have mentioned this before, I am seeing this on XP 32bit.
-Justin
Apr 22, 2008 at 5:42 PM
The problem is caused by Scintilla.dll not returning the font correctly. You need to fix it manually by adding FontName and Size see boldfaced. Then the control should work again. Hope this helps.

this.sciDocument.Styles.BraceBad.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.sciDocument.Styles.BraceBad.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.BraceBad.FontName = "Courier New";
this.sciDocument.Styles.BraceBad.ForeColor = System.Drawing.SystemColors.ControlText;
this.sciDocument.Styles.BraceBad.IsChangeable = false;
this.sciDocument.Styles.BraceBad.IsVisible = false;
this.sciDocument.Styles.BraceBad.Size = 9.75F;
this.sciDocument.Styles.BraceLight.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.sciDocument.Styles.BraceLight.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.BraceLight.FontName = "Courier New";
this.sciDocument.Styles.BraceLight.ForeColor = System.Drawing.SystemColors.ControlText;
this.sciDocument.Styles.BraceLight.IsChangeable = false;
this.sciDocument.Styles.BraceLight.IsVisible = false;
this.sciDocument.Styles.BraceLight.Size = 9.75F;
this.sciDocument.Styles.CallTip.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.CallTip.FontName = "Courier New";
this.sciDocument.Styles.CallTip.IsChangeable = false;
this.sciDocument.Styles.CallTip.IsVisible = true;
this.sciDocument.Styles.CallTip.Size = 9.75F;
this.sciDocument.Styles.ControlChar.BackColor = System.Drawing.SystemColors.Control;
this.sciDocument.Styles.ControlChar.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.ControlChar.FontName = "Courier New";
this.sciDocument.Styles.ControlChar.ForeColor = System.Drawing.SystemColors.ControlText;
this.sciDocument.Styles.ControlChar.IsChangeable = false;
this.sciDocument.Styles.ControlChar.IsVisible = true;
this.sciDocument.Styles.ControlChar.Size = 9.75F;
this.sciDocument.Styles.Default.BackColor = System.Drawing.SystemColors.ControlLightLight;
this.sciDocument.Styles.Default.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.Default.FontName = "Courier New";
this.sciDocument.Styles.Default.ForeColor = System.Drawing.SystemColors.ControlText;
this.sciDocument.Styles.Default.IsChangeable = false;
this.sciDocument.Styles.Default.IsVisible = true;
this.sciDocument.Styles.Default.Size = 9.75F;
this.sciDocument.Styles.IndentGuide.BackColor = System.Drawing.SystemColors.Control;
this.sciDocument.Styles.IndentGuide.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.IndentGuide.FontName = "Courier New";
this.sciDocument.Styles.IndentGuide.ForeColor = System.Drawing.SystemColors.ControlText;
this.sciDocument.Styles.IndentGuide.IsChangeable = false;
this.sciDocument.Styles.IndentGuide.IsVisible = false;
this.sciDocument.Styles.IndentGuide.Size = 9.75F;
this.sciDocument.Styles.LastPredefined.BackColor = System.Drawing.SystemColors.Control;
this.sciDocument.Styles.LastPredefined.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.LastPredefined.FontName = "Courier New";
this.sciDocument.Styles.LastPredefined.ForeColor = System.Drawing.SystemColors.ControlText;
this.sciDocument.Styles.LastPredefined.IsChangeable = false;
this.sciDocument.Styles.LastPredefined.IsVisible = false;
this.sciDocument.Styles.LastPredefined.Size = 9.75F;
this.sciDocument.Styles.LineNumber.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.LineNumber.FontName = "Courier New";
this.sciDocument.Styles.LineNumber.ForeColor = System.Drawing.SystemColors.ControlText;
this.sciDocument.Styles.LineNumber.IsChangeable = false;
this.sciDocument.Styles.LineNumber.IsVisible = false;
this.sciDocument.Styles.LineNumber.Size = 9.75F;
this.sciDocument.Styles.Max.BackColor = System.Drawing.SystemColors.Window;
this.sciDocument.Styles.Max.CharacterSet = ScintillaNet.CharacterSet.Ansi;
this.sciDocument.Styles.Max.FontName = "Courier New";
this.sciDocument.Styles.Max.ForeColor = System.Drawing.SystemColors.ControlText;
this.sciDocument.Styles.Max.IsChangeable = false;
this.sciDocument.Styles.Max.IsVisible = false;
this.sciDocument.Styles.Max.Size = 9.75F;
Apr 22, 2008 at 8:43 PM
Edited Apr 22, 2008 at 10:34 PM
I am replying to my post earlier. It looks like when you enabled these lines. You can't make changes to the active document. So, I think it's better to have them commented out?
Apr 22, 2008 at 10:23 PM
Yeah, I tried your suggestion, and it did get rid of the FontName error, but now I cannot edit the document.

Reproducing this in the SCide project was interesting. I copied and pasted your Styles properities above directly into frmDocument.Designer.cs. everything seemed to work fine. except I couldn't use the Backspace key.

I then added a print dialog to the form, immediately removed the print dialog, and rebuilt the solution. Now when the document comes up, it works fine until I select a Language menu item. At that time, the document goes blank, and cannot be edited.

I also noticed that when the code generator is started with the addition of the print dialog, that the Styles..IsVisible and Syles..IsCangeable properties all get set to false. This is something I noticed in my own project as well. In my own project, I am unable to set these properties to true in the Properties Window of the Designer. Setting these manually in the Designer.cs file only gets overwritten with false values when the project is started.

I'm thinking that I will have to deal with deleting lines from the Designer.cs file.
Apr 22, 2008 at 11:37 PM
I was reading through some of the other discussions to see if this issue could be related to things other people have seen. It seems like the problems that I am having are identical to those described in the discussion "Problems with the 2.0 release" http://www.codeplex.com/ScintillaNET/Thread/View.aspx?ThreadId=22400.

In that thread, it was said that the fix for this was in the latest 2.0 release. That is the version that I am using. Am I supposed to get this fix from the development source?

Thanks,
Justin
Apr 23, 2008 at 5:42 PM
I am using change-set 31025 (Is this the latest?) and sync with Release 2.0 to test this. The problem is still there.

I was actually looking for a solution on changing the syntax highlight at runtime without a XML and came across this post.

For temporary workaround, I just commented out the lines. Need to find a better solution than just commenting/deleting the lines.