Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 Navbar weirdness

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 - Apr 28 2020 : 1:21:08 PM
That contents of the Alt+M droplist is definitely not right. Neither seems the contents of the definition field.

Agree that the ctor of the StitchType class is a bit weird, yet still valid C#.

public StitchType(StitchClass c, int n, string t, string d, (int, int, int) dist, (int, int, int) mbase) {}


PS: The enum StitchClass is not colored as enum (when i put the enum definition in the same .cs file all is fine)
6   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Apr 30 2020 : 12:39:51 PM
I can get some odd results for context on multi-lined C# initializers. But since the line wrapping is a visual aspect, so the full context is quite long, I am not sure that the context is wrong, it just looks odd displayed like that.
Uniwares Posted - Apr 30 2020 : 12:28:58 PM
The enum coloring kinda bounces around. Sometimes its right, sometimes its not. Maybe depends on seconday instances of VS too. Not sure.

The strange thing about that "newStitchType" is that it shows up ONLY when I am with the caret on a parameter of the StitchType constructor, on any other location I get the correct "Q7.Core.StitchType.ISOTypes"
feline Posted - Apr 30 2020 : 12:20:43 PM
Literal strings are not being shown in the definition field for C++ and C# function calls that pass literal strings as parameters. I am not sure if this is by design or a bug, but I have put in a case for this:

case=142216

The enum colouring, I am not sure what is going on there. Using your Q7 solution, at the top of the file "BaseCollection.cs", so just inside the namespace, I have added the enum definition from above. The at the top of the file "ExpandString.cs", again just inside the namespace, I have added the two classes from above, and the enum item colouring is correct for me here doing this.

Ah, sorry, I was confused, when you said Alt-M I was thinking of the Alt-M list its self, not the context field, which becomes the Alt-M filter field when the Alt-M list is opened. That explains the screen shot you posted.

I have put in a bug report for this, since the context as shown is wrong:

case=142217

but what should be shown here? With a space after "new", so you can tell it is making a new instance of the type StitchType this is actually your current context, so somewhat confusing looking, but correct.
Uniwares Posted - Apr 30 2020 : 11:15:26 AM
Yes, Alt+G works fine. But to me the "Q7.Core.StitchType.ISOTypes.newStitchType" doesnt look right in the Alt+M field. Doesnt show like this for any other initializer.

Also, the definition field normally stops after "new typename[]" and doesnt show initializer values. And why are strings left out completely?

no, doesnt look right to me.
feline Posted - Apr 30 2020 : 10:58:22 AM
Separating out the enum into a separate .cs file makes no difference to the colouring for me. Does Alt-G work correctly on the enum items when they are in a different file for you?
feline Posted - Apr 30 2020 : 10:56:59 AM
As I understand it "(int, int, int) dist, (int, int, int) mbase" is defining two tuples as parameters, which is why it looks odd, but compiles.

I have a version of this code here now, compiling. When I place the caret into the "StitchType(...)" block, I get the same information in the definition field, the enum and number parameters are being shown, but the string parameters are not being shown. Is this what you are seeing there?

For the Alt-M list, I don't see a problem here. The full code sample I have is:

public enum StitchClass
{
    Class_101,
    Class_103
}

public class StitchType
{
    /// <summary>
    /// tuples for dist and mbase?
    /// </summary>
    public StitchType(StitchClass c, int n, string t, string d, (int, int, int) dist, (int, int, int) mbase) { }
}

public static class StitchTypes
{
    public static readonly StitchType[] ISOTypes = new StitchType[]
    {
        new StitchType(StitchClass.Class_101, 1,"Chainstitch","stitch formed by needle...", (1, 2, 3), (4, 5, 6)),
        new StitchType(StitchClass.Class_103, 1,"Blindstitch","stitch is formed with one...", (7, 6, 5), (4, 3, 2))
    };
}

and the Alt-M list for me simply lists "StitchType" and its constructor, and then a single entry for the class StitchTypes, which is what I would expect here.

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