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
 Feature Requests
 Rename Functionality in C#
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Peter
New Member

4 Posts

Posted - Feb 01 2008 :  04:51:39 AM  Show Profile  Reply with Quote
Hello Tomato,
I'd like report you bug I found, there is problem when I try to rename variable in C# project and this variable is localized. Then it replace all occurence in cs files, but it is not replacing occurence in .resx (localization) file.
Thanks,
Peter
PS: I'm using Visual Assist X version 10.4.1626.0 built 2008.01.17

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 01 2008 :  3:12:24 PM  Show Profile  Reply with Quote
How are you doing this? A quick web search got me to this page:

http://www.devhood.com/tutorials/tutorial_details.aspx?tutorial_id=211

which explains localizing the String's in an application. Is this what you are doing, and then renaming the variable that is referenced in the .resx file?

Or are you doing something else?

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

Peter
New Member

4 Posts

Posted - Feb 04 2008 :  04:14:51 AM  Show Profile  Reply with Quote
Yes, I'm doing similar. Then there is an reference to the variable in .resx file, when I choose va-context menu and "rename" operation doesn't include .resx file.
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 04 2008 :  3:25:14 PM  Show Profile  Reply with Quote
Having another look at that example, it looks like a string table in C++, where you load a string via its ID. The code:

private void UpdateUI()
{
    labelFirstName.Text = m_ResourceManager.GetString("labelFirstName");
    ///
    this.Text = m_ResourceManager.GetString("formTitle");
}

is simply loading the items from the resource file by their ID's. There does not seem to be any firm connection between the variable in the code and the string ID.

Are you doing something different, where the ID's are somehow becoming variables? If so could you post a code sample, or direct me to some information on this?

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

Peter
New Member

4 Posts

Posted - Feb 05 2008 :  06:14:31 AM  Show Profile  Reply with Quote
ok,
this is exact situation:
by VS2005 form designer I create a object and it create record:

resources.ApplyResources(this.includedAngleDataGridViewTextBoxColumn, "includedAngleDataGridViewTextBoxColumn");

and when I rename string (by VA->Rename with checked flag "Comments and Strings") I'm thinking that everything is OK, but becouse of reference to resources:

<data name="includedAngleDataGridViewTextBoxColumn.HeaderText" xml:space="preserve"> .......

I can lost my reference and It goes absolutely wrong!
Then it means for me: replace string once again ... and this is bad, I had 300 objects similar and it takes me twice time as when I will do it with replace operation in VS2005 only.
I really like VA ... There are absolutelly great features, unfortunatelly sometimes I have problems like this one, when the functionality doesn't work as I expect.
Thanks,
Peter
Go to Top of Page

feline
Whole Tomato Software

United Kingdom
19020 Posts

Posted - Feb 06 2008 :  3:00:57 PM  Show Profile  Reply with Quote
I understand what is going on now. I have put in a feature request for VA to scan inside RESX files:

case=12413

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

Peter
New Member

4 Posts

Posted - Feb 07 2008 :  03:44:34 AM  Show Profile  Reply with Quote
Thanks,
Regards,
Peter
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