Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 VAX 1538: partial classes and Alt+G

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
Uniwares Posted - Oct 13 2006 : 12:06:41 AM
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.


9   L A T E S T    R E P L I E S    (Newest First)
feline Posted - Oct 13 2006 : 1:25:14 PM
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.
Uniwares Posted - Oct 13 2006 : 1:00:49 PM
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?
feline Posted - Oct 13 2006 : 12:56:09 PM
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!"
Uniwares Posted - Oct 13 2006 : 12:43:41 PM
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?
feline Posted - Oct 13 2006 : 12:28:22 PM
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
feline Posted - Oct 13 2006 : 12:26:52 PM
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.
Uniwares Posted - Oct 13 2006 : 09:14:51 AM
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.
feline Posted - Oct 13 2006 : 09:00:56 AM
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.
jpizzi Posted - Oct 13 2006 : 12:54:33 AM
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.)

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