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
 Create from usage issue
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

diarrhio
Ketchup Master

53 Posts

Posted - Oct 12 2009 :  4:04:25 PM  Show Profile  Reply with Quote
If you have an object of some class, type in some method which you want to create, then do a Create from Usage, then the method will get added to the bottom of the class definition, complete ignoring any visibility (i.e. private, public) declarations you have. It should put the new method in a public section of the class declaration. Here is an example:

class A
{
public:
    void SomeMethod();

private:
    int m_SomeData;
};

void main()
{
    A aObject;

    // New method we want to create from usage
    a.NewMethod();
}

Now we right click on the "NewMethod" token above and select "Create from Usage". What we see is the following:
class A
{
public:
    void SomeMethod();

private:
    int m_SomeData;
    void NewMethod();
};

Rather than:
class A
{
public:
    void SomeMethod();
    void NewMethod();

private:
    int m_SomeData;
};


I am using build 1738 on Visual Studio 2005, SP1.

Thanks

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 12 2009 :  6:33:39 PM  Show Profile  Reply with Quote
We are planning to improve this by retaining the visibility:

case=29902

I don't understand completely how it will be done, so added a question to the case.
Go to Top of Page

diarrhio
Ketchup Master

53 Posts

Posted - Oct 12 2009 :  7:45:47 PM  Show Profile  Reply with Quote
Just out of curiosity, what do these case numbers refer to? Is there some sort of bug/task tracker available for us to look at?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18749 Posts

Posted - Oct 13 2009 :  1:05:19 PM  Show Profile  Reply with Quote
This FAQ explains this:

http://docs.wholetomato.com?W318

zen is the art of being at one with the two'ness
Go to Top of Page

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Oct 13 2009 :  2:59:27 PM  Show Profile  Reply with Quote
The details: it will retain the visibility of the function in which you type the new one. If you try to call a function which will be in an another class, "Create method" will create the declaration with public visibility.
Go to Top of Page

diarrhio
Ketchup Master

53 Posts

Posted - Oct 13 2009 :  7:21:44 PM  Show Profile  Reply with Quote
Thank you. And thank you.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Mar 16 2016 :  12:04:05 AM  Show Profile  Reply with Quote
case=29902 is fixed in build 2093
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