Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
User name:
Password:
Save Password
Forgot your password?

 All Forums
 Visual Assist
 Technical Support
 [1734] Create from usage on struct treated as enum
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

grandchain
Junior Member

United Kingdom
22 Posts

Posted - Sep 09 2009 :  06:03:23 AM  Show Profile  Reply with Quote
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

sean
Whole Tomato Software

USA
2817 Posts

Posted - Sep 09 2009 :  1:09:00 PM  Show Profile  Reply with Quote
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.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Jan 31 2010 :  1:25:01 PM  Show Profile  Reply with Quote
case=32084 is fixed in build 1810

Whole Tomato Software, Inc.
Go to Top of Page

support
Whole Tomato Software

5566 Posts

Posted - Mar 08 2010 :  04:15:09 AM  Show Profile  Reply with Quote
case=32085 is fixed in build 1814

Whole Tomato Software, Inc.
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
© 2023 Whole Tomato Software, LLC Go To Top Of Page
Snitz Forums 2000