Whole Tomato Software Forums
Whole Tomato Software Forums
Main Site | Profile | Register | Active Topics | Members | Search | FAQ
 All Forums
 Visual Assist
 Technical Support
 What is VAX trying to tell me?

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
pwaugh Posted - Mar 09 2008 : 06:20:55 AM
Ok, being new to C# (usually do C++), I'm playing around and in the Game class, I have this method:


	public bool PullOutBooks(Player player)
	{
		// Pull any books in players hand
		List<Card.Values> booksPulled = player.PullOutBooks();
		// Add pulled books to books dictionary
		foreach (Card.Values value in booksPulled)
			books.Add(value, player);

		if (player.CardCount == 0)
			return true;
		return false;
	}


and as you can see an identically named method in the player class.

Normally, VAX colors all my methods Red, but this one is not colored Red. Moreover, when I change the name to something else, it does color it Red!

Is this a hint from VAX that I'm doing something wrong?

Patrick
10   L A T E S T    R E P L I E S    (Newest First)
support Posted - Jul 20 2011 : 02:10:30 AM
case=14446 is fixed in build 1854
feline Posted - Jul 24 2009 : 2:06:44 PM
I am seeing the same effect here. Thank you for the clear description.

case=14446
Dany Posted - Jul 24 2009 : 09:34:45 AM
Hmmm, I know that this is a rather old topic (and thus maybe fixed).

But in C# wit VAX Build 1727 I can see something similar.

When I use a selfmade method directly in a foreach statement (without brackets), all references are shown in black. When I put the method call in brackets I get the desired syntax coloring (orange in my case).

        ReplaceReferences(resXFile);
        foreach (string resXFile in resXFiles)
          ReplaceReferences(resXFile);


After the change:

        ReplaceReferences(resXFile);
        foreach (string resXFile in resXFiles)
        {
          ReplaceReferences(resXFile);
        }
feline Posted - Mar 12 2008 : 3:19:49 PM
It is fairly minor, and easy to fix when you know the fix

Thank you for pointing it out. It is important to try and fix these "little" problems, since each one we fix makes VA a better product
pwaugh Posted - Mar 12 2008 : 3:00:57 PM
That did it! Glad we were able to identify where VAX was having problems. =)

This is so minor, I'm embarrassed pointing it out. :D

There are two things in life I couldn't live without: My Blackberry, and my VAX!
feline Posted - Mar 12 2008 : 2:27:35 PM
Apologies, that was not as clear as it could have been. In your function:


		private void Deal()
		{
			stock.Shuffle();

			for (int i = 0; i < 5; i++)
			{
				foreach (Player player in players)	// Deal five cards to each player
					player.TakeCard(stock.Deal());
			}

			foreach (Player player in players)
			{
				PullOutBooks(player);				// PullOutBooks() in hands
			}
		}

try adding curly brackets after the foreach line like this. Hopefully that will fix the problem for you.
pwaugh Posted - Mar 12 2008 : 12:56:13 PM
I'm not sure I follow what change you want me to try. You want me to make player a List<String> type instead of a Player type?
feline Posted - Mar 12 2008 : 09:58:27 AM
The problem is that foreach statement. I have managed to simplify the test down to:

class Game
{
    private void Deal()
    {
        List<String> players = new List<String>();
        foreach (String player in players)
            PullOutBooks(player);				// PullOutBooks() in hands
    }

    public bool PullOutBooks(String player)
    {
        return true;
    }
}


For me, if I change the foreach statement to:

        foreach (String player in players)
        {
            PullOutBooks(player);				// PullOutBooks() in hands
        }

the problem goes away. Can you try the same change please, and see if this fixes the problem for you?

case=14446
pwaugh Posted - Mar 11 2008 : 9:27:14 PM
Well, I'm using VS 2008 for starters.

However, I have narrowed it down. Earlier in class I have this method:


		private void Deal()
		{
			stock.Shuffle();

			for (int i = 0; i < 5; i++)
			{
				foreach (Player player in players)	// Deal five cards to each player
					player.TakeCard(stock.Deal());
			}

			foreach (Player player in players)
				PullOutBooks(player);				// PullOutBooks() in hands
		}



If I comment out the call to the PullOutBooks() near the end, then suddenly the method is colored Red!

Patrick
kevinsikes Posted - Mar 10 2008 : 02:30:26 AM
Hi Patrick,

I rigged up a few support classes around your snippet to create a minimally reproducible example. Both the Player.PullOutBooks and Game.PullOutBooks methods are colored correctly. I am using VS2005 SP1 on Windows XP SP2 with Visual Assist X 1626. Can you try boiling down your code to the minimum needed to reproduce the problem and let us know what you find? Thanks.


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