Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 [1734] Create from usage on struct treated as enum

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
grandchain Posted - Sep 09 2009 : 06:03:23 AM
Hi,

I have the following struct:

struct ChartFormatting
{
    ChartFormatting();

    int         gridColour;                 ///< The main grid
    int         graphColour;                ///< The actual data line
    int         markColour;                 ///< Marks highlighting specific values
    int         backColour;                 ///< The background
    int         labelColour;                ///< The labels
    int         dataWidth;                  ///< The width of the data line(s)
    int         markWidth;                  ///< The width of the mark line(s)
    const char  *font;                      ///< The font name for labels
    double      fontSize;                   ///< The font size (points)
};


In a function using this, I typed

pChart->yAxis()->setWidth( m_formatting.axisWidth );


I then did Create From Usage... on axisWidth. I got the following:

struct ChartFormatting
{
    ChartFormatting();

    int         gridColour;                 ///< The main grid
    int         graphColour;                ///< The actual data line
    int         markColour;                 ///< Marks highlighting specific values
    int         backColour;                 ///< The background
    int         labelColour;                ///< The labels
    int         dataWidth;                  ///< The width of the data line(s)
    int         markWidth;                  ///< The width of the mark line(s)
    const char  *font;                      ///< The font name for labels
    double      fontSize;                   ///< The font size (points)
    axisWidth;
};


Note axisWidth has been added, but has no type.

When I hover over setWidth, VA correctly tells me it's

void Axis::setWidth( int width )

I would have expected axisWidth to be added as an int. It would have been really cool if it also matched the tabbing of the other members, but that's just a nicety.

I'm in Visual Studio 2005.

Cheers,

Ian
3   L A T E S T    R E P L I E S    (Newest First)
support Posted - Mar 08 2010 : 04:15:09 AM
case=32085 is fixed in build 1814
support Posted - Jan 31 2010 : 1:25:01 PM
case=32084 is fixed in build 1810
sean Posted - Sep 09 2009 : 1:09:00 PM
VA should have prompted you with a dialog showing the declaration of the member (there is no prompt for enum items). However, in this case it displays only the name (no type). It should have some non-blank default for the type: case=32084.

I've also opened case=32085 for inferring the type from the function call usage.

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