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
 VAX 1538: partial classes and Alt+G
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Oct 13 2006 :  12:06:41 AM  Show Profile  Reply with Quote
VS2005, C#

I am having problems with c# classes which are partial, mostly Forms classes.

Given a dlgTestForm class which is implemented in two files - dlgTestForm.cs and dlgTestForm.Designer.cs.
Alt+G on the type dlgTestForm in any file except these two, will open a menu containing correctly both files, selecting any of them will jump to somewhere at the beginning of the current file.


jpizzi
Tomato Guru

USA
642 Posts

Posted - Oct 13 2006 :  12:54:33 AM  Show Profile  Reply with Quote
Hmmm. http://forum.wholetomato.com/forum/topic.asp?TOPIC_ID=5391

Maybe you should stop working with partial classes

You just don't seem to have much luck with those.

(sorry. couldn't help it.)

Joe Pizzi

Edited by - jpizzi on Oct 13 2006 12:54:59 AM
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 13 2006 :  09:00:56 AM  Show Profile  Reply with Quote
using VS2005 and a C# test project, just one form without anything fancy, alt-g from the main function is working correctly for me. like you I am getting two lines on alt-g, one for the cs file and one for the designer.cs file. both take me to the top of the class in the correct file.

I have now taken an existing C# project and added a new form, called "dlgTestForm.cs" to the project. adding the code:

dlgTestForm foo = new dlgTestForm();
foo.Text = "woo hoo";


alt-g on "dlgTestForm" is working correctly for me. I have restarted the IDE and it still works fine for me.

when you hover the mouse over "dlgTestForm" does the HCB show you something sensible? if you look in OFIW are the two cs files for this new class listed?

the first alt-g worked fine for me without having to restart the IDE, but have you tried restarting since adding this form?

I know my C# projects tend to be very simple, but they should still show this effect.

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

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Oct 13 2006 :  09:14:51 AM  Show Profile  Reply with Quote
I guess i pinned it down. I have moved the forms files in a subfolder (using the solution explorer), also i have copied some of the forms (which creates a "copy of xxx.cs" which i renamed then to its new name).
This profundly confuses VAX. It keeps the old references in memory, HCB shows the usual mix of classes, duplicate entries, pointing to the old and new locations.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 13 2006 :  12:26:52 PM  Show Profile  Reply with Quote
moving the form into a folder definitely causes problems. I was able to really upset alt-g by doing this. thank you for the hint, I probably would not have thought to try that.

case=3006

How did you do the copy and rename? It is not obvious, but the solution explorer did let me copy a form, which produced the "Copy of xxx.cs", just as you report. However inside the class has not been renamed, so VA rename is picking up both the old and new files. *doh* no, it is only picking up one of the new files.

this is just hitting

case=2888

from an unexpected angle. it is renaming the copy in solution explorer that is causing this problem.

i renamed the copied form in solution explorer, then restarted VS2005, then used VA's rename to only rename the form in the new "copied" files. after doing this I am not seeing any duplicates in the HCB.

before the code renaming I was seeing the duplicates. however at this time the single project did actually contain two classes with the same name, in the same namespace, so it is understandable the HCB merged the two together into one list.

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

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 13 2006 :  12:28:22 PM  Show Profile  Reply with Quote
and to think, I have been accused of taking delight in finding obscure and nasty bugs in software! I should introduce those people to you

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

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Oct 13 2006 :  12:43:41 PM  Show Profile  Reply with Quote
Hehe, anytime. You are welcome. I am known to have the gift of crashing any wonderful, new and shiny, crash-proof application by just looking at it. And you are wondering where my 1400-and-some posts come from?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 13 2006 :  12:56:09 PM  Show Profile  Reply with Quote
I am good at breaking software - I have years of practice but some of the things you find, I don't think I would ever have thought to try them!

I can see our new marketing campaign now... "It was over 3 minutes before Uniwares found a bug!"

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

Uniwares
Tomato Guru

Portugal
2320 Posts

Posted - Oct 13 2006 :  1:00:49 PM  Show Profile  Reply with Quote
quote:
Originally posted by feline

I can see our new marketing campaign now... "It was over 3 minutes before Uniwares found a bug!"



So wholetomato has fixed the 237 open ones that i reported between 2002 and 2006? Great. Where can I download build 5212?
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
18755 Posts

Posted - Oct 13 2006 :  1:25:14 PM  Show Profile  Reply with Quote
I actually meant 3 minutes before you found a *new* bug I doubt it takes you that long to be honest, but it gives us something to work towards.

zen is the art of being at one with the two'ness
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