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
 MsgBox after "Change Signature"
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

peterchen
Tomato Guru

126 Posts

Posted - Aug 03 2006 :  12:00:33 PM  Show Profile  Reply with Quote
After changing the signature of a method, there's (under the given conditions) the following messagebox:

---------------------------
Warning
---------------------------
Change in return type and/or parameter type detected in new signature. You should now update references to accommodate the new signature.
---------------------------
OK
---------------------------

I think it's not necessary, it stops the flow, you show the list of references in the Output window (good!) which acts as a reminder, and ususally I know what I just did.

But that might be just a personal preference. What do others think?



(Did I mention already that I LOVE the refactoring, especially since I'm still stuck with VC6 most of the time?! Well, I LOVE ...)

accord
Whole Tomato Software

United Kingdom
3287 Posts

Posted - Aug 03 2006 :  12:33:02 PM  Show Profile  Reply with Quote
I agree. Very confusing.
Go to Top of Page

khb
Tomato Guru

Germany
337 Posts

Posted - Aug 03 2006 :  3:31:49 PM  Show Profile  Reply with Quote
Also agree. When the message appears I always think "What did I wrong" at first.

Regards,
Marcus.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Aug 03 2006 :  7:20:58 PM  Show Profile  Reply with Quote
it looks like the wording of the warning has been changed, and hopefully improved, in the next build.

case=1529

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

peterchen
Tomato Guru

126 Posts

Posted - Aug 04 2006 :  03:50:13 AM  Show Profile  Reply with Quote
ehem - what about removing it alltogether?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Aug 06 2006 :  1:58:19 PM  Show Profile  Reply with Quote
but if we remove it, then how do we stop you entering code faster than we can parse it?

adding an option to stop the warning is under consideration

case=1158

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 - Aug 06 2006 :  2:56:54 PM  Show Profile  Reply with Quote
What about to change the references automatically?

If Ref++ can do it, I think it can be done
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Aug 06 2006 :  3:40:19 PM  Show Profile  Reply with Quote
*um* if i add 3 parameters you want VA to insert "0" for all of them? what if the first parameter is a "std::string", the second parameter is an int and the third parameter is of type:

QValueList<QString, QPair<QString, drugMappingThemUs> >

and yes, i do have functions taking parameter lists like that. rather a lot of functions like that, so making these sort of modifications via VA's refactoring is something i am moving into. it requires a change to how i work, so i am moving into it slowly

what on earth does ref++ do in cases like this? in a lot of my code there will be no sensible default parameter that a tool could insert. or does it ask you what to do for each and every function call? or are you talking about something totally different?

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 - Aug 06 2006 :  5:16:41 PM  Show Profile  Reply with Quote
Hmmm...

I have tried Ref++, but I am not using it now. I don't remember how Ref++ solved the cases that you said...
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Aug 08 2006 :  6:08:57 PM  Show Profile  Reply with Quote
if / when i get some spare time i may download the latest trial of Ref++ and have a look. i recall looking at it a while ago and finding more problems than benefits *sigh*

as for default parameters, what happens when the new parameter is a reference?

i *like* the idea of the tools doing as much of the basic work as possible for me, but there are cases where any form of guessing on the tools part is likely to be worse than leaving the code alone, and invalid. of course a *REALLY* clever tool may be able to work out what i am planning, but i am not sure that ref++ or VA is quite there yet

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

peterchen
Tomato Guru

126 Posts

Posted - Aug 08 2006 :  7:29:36 PM  Show Profile  Reply with Quote
I agree - fixing distant code with guesses that (try to) silence the compiler is a very bad idea.

>> drugMappingThemUs
:omg: hungarian notation or russian friend?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18750 Posts

Posted - Aug 09 2006 :  8:49:27 PM  Show Profile  Reply with Quote
that is a "close enough for a post" variable name. the current program i am writing has about 25 maps as member variables

its not really hungarian notation, instead i have a class called drugName which is sometimes used for "them" drugs and sometimes used for "us" drugs.

it quickly gets very confusing, so i am using long, vaguely hungarian names, so i can see what i am doing when i start throwing these things around.

the program is designed around the databases, but the databases are "from them", and are, as far as i can tell, hovering on the edge of melt down, which is doing unpleasent things to my code

as for hungarian, it has its place if used carefully it is that or move the mouse to hover over the variable name, and that is just a silly idea.

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

support
Whole Tomato Software

5566 Posts

Posted - Aug 12 2006 :  11:23:23 PM  Show Profile  Reply with Quote
Case 1529 is fixed in build 1532.
Go to Top of Page

sean
Whole Tomato Software

USA
2817 Posts

Posted - Nov 18 2013 :  3:15:58 PM  Show Profile  Reply with Quote
Change Signature was overhauled in build 2007.
case=1158 is fixed in build 2007.
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