Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VA 2420: To Italic or not italic, 's the question

You must be registered to post a reply.
Click here to register.

Screensize:
UserName:
Password:
Format: BoldItalicizeUnderlineStrikethrough Align leftCenterAlign right Insert horizontal ruleUpload and insert imageInsert hyperlinkInsert email addressInsert codeInsert quoted textInsert listInsert Emoji
   
Message:

Forum code is on.
Html is off.

 
Check to subscribe to this topic.
   

T O P I C    R E V I E W
Uniwares Posted - Mar 16 2022 : 05:55:41 AM
Care to explain that?


In this case, Equals() is one of the .NET methods for Enums. C#, Win7, VS2017, .NET 4.52
2   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Mar 18 2022 : 07:52:42 AM
Thank you for the update. I was going to ask about scrolling and if it had any effect on this.

The code we used for colouring, and also applying bold and italic is deliberately fast and simple. This is so it can keep up with scrolling and moving through your code at speed, but as a result it is also easier to confuse than a deeper parse, for example Find References. So sometimes a colouring problem will appear that will disappear when you scroll, since that simply causes VA to check and redraw what it thinks is going on, so any changes to the code will be reflected in the colouring.
Uniwares Posted - Mar 16 2022 : 06:50:06 AM
Already got it. I have many lines like that in this file and can repro this effect on any of them.
Its related to having an error in the expression and then correcting it. Lets recap:
Original code was
if ( Sim.CreditTypeBehaviour.ToString().Equals(CreditTypeBehaviour.AutomobilePrivate.ToString())
  || Sim.CreditTypeBehaviour.ToString().Equals(CreditTypeBehaviour.AutomobileEnterprise.ToString())
  || Sim.CreditTypeBehaviour.ToString().Equals(CreditTypeBehaviour.EquipmentEnterprise.ToString())
  || Sim.CreditTypeBehaviour.ToString().Equals(CreditTypeBehaviour.MortgageLoanEnterprise.ToString()))

(Please ignore the various levels of stupidity in this code, written by an JS coder years ago) Then I edited it to
if ( Sim.CreditTypeBehaviour.Equals(CreditTypeBehaviour.AutomobilePrivate)
  || Sim.CreditTypeBehaviour.Equals(CreditTypeBehaviour.AutomobileEnterprise)
  || Sim.CreditTypeBehaviour.Equals(CreditTypeBehaviour.EquipmentEnterprise)
  || Sim.CreditTypeBehaviour.Equals(CreditTypeBehaviour.MortgageLoanEnterprise)

Notice the missing last closing bracket? Yes, I deleted one too many, thus the line was marked with the squiggly red line, indicating error. Now the erroneous italic started, even after adding the missing bracket, it continues to show the alternating italics on Equals(). After scrolling around the lines get redrawn with correct italics.

© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000