Board index » Visual Studio » Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

Visual Studio267
I am working with a project ported from .NET2003 to .NET2005.



I want to add a variable that should be tied to an edit box in a dialog. I

select the edit box in Resource View and right click, then select the "Add

Variable..." menu item.



In the "Add Member Variable Wizard" I change the Category to "Value" and the

variable type changes to CString. The control ID verifies that I'm working

with my edit box.



I enter the variable name as m_sQQQ (so I won't miss it anywhere) and click

on Finish. No sign of this new variable anywhere in the Current Project.



The dialog is associated with a class CPropPageTLE and I would have expected

the variable would have been inserted in that class as well as the

associated DDX statement in the DoDateExchange(...) routine to access the

variable. Nothing has been inserted in either the header of the .cpp file.



That's the way I would have done it using VS.NET 2003. VS.NET 2005 doesn't

seem to do the same thing!



Is there a different way of doing this in .NET 2005?



Ed Mitchell

--

--

Edward E.L. Mitchell

Web: www.racesail.org

Phone: (508)771-0806

500 Ocean St., Unit 134,

Hyannis, MA 02601


-
 

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

Quote
Is there a different way of doing this in .NET 2005?



No. It sounds as though you've either encountered a bug (check your

files aren't read-only first though), or there's something not quite

right with your VS installation.



The wizards are notoriously flaky and seem to be easy to upset - being

held together with wet string and chewing gum.



Dave

-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

I checked the files and they are writeable! I checked doing the same thing

on a project that had been created from scratch under VS.NET 2005. In that

case the variable and DDX call was created correctly inside the dialog

class.



My problem seems to be with an app that had been ported from VS.NET 2003 and

been gobbled up and converted to the new version.



Is there any way I can force my app to recreate itself.



Ed





"David Lowndes" <DavidL@example.invalid>wrote in message

Quote
>Is there a different way of doing this in .NET 2005?



No. It sounds as though you've either encountered a bug (check your

files aren't read-only first though), or there's something not quite

right with your VS installation.



The wizards are notoriously flaky and seem to be easy to upset - being

held together with wet string and chewing gum.



Dave





-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

Quote
I checked the files and they are writeable! I checked doing the same thing

on a project that had been created from scratch under VS.NET 2005. In that

case the variable and DDX call was created correctly inside the dialog

class.



It sounds like you've found a real bug then :(

If possible, it would be useful to get a repro case and submit it to

the bug reporting site:



connect.microsoft.com/VisualStudio/feedback/">connect.microsoft.com/VisualStudio/feedback/



Quote
Is there any way I can force my app to recreate itself.



I'm not sure what you mean by that, but taken literally - no.



I'd just revert to entering stuff in the editor.



Dave

-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

On Sun, 30 Jul 2006 14:42:35 -0400, "Edward Mitchell"

<EELMitchell@newsgroup.nospam>wrote:



Quote
I enter the variable name as m_sQQQ (so I won't miss it anywhere) and click

on Finish. No sign of this new variable anywhere in the Current Project.



I had this problem when I caused a parse error in the class

header file (I was rearranging declarations and dropped a

semicolon, I think). Check that you haven't done the same.





JAB

--

John Belli

Software Engineer

Refrigerated Transport Electronics, Inc.

-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

David,



I asked for help (SRX060731600614) and found the answer. Always make sure

that the project will compile before trying to use the wizards. I had been

in the middle of changing the name of the dialog class but the name in the

header file didn't match the one in the .cpp file. One file had the

original wizard created class, CPropPageTLEScore, and the other had the

changed CPropPageScoreTLE. If I had tried to compile, the mismatch would

have been obvious!



It was unfortunate that the wizard appeared to do it's thing but failed

silently. It would have been nice if there had been some message that

something was screwed up. But still the lesson learned is to make sure the

project compiles cleanly first.



Thanks for your comments. I appreciate the assistance.



Ed



"David Lowndes" <DavidL@example.invalid>wrote in message

Quote
>I checked the files and they are writeable! I checked doing the same

>thing

>on a project that had been created from scratch under VS.NET 2005. In

>that

>case the variable and DDX call was created correctly inside the dialog

>class.



It sounds like you've found a real bug then :(

If possible, it would be useful to get a repro case and submit it to

the bug reporting site:



connect.microsoft.com/VisualStudio/feedback/">connect.microsoft.com/VisualStudio/feedback/



>Is there any way I can force my app to recreate itself.



I'm not sure what you mean by that, but taken literally - no.



I'd just revert to entering stuff in the editor.



Dave





-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

John



It was, as you say, my error. See my reply to David.



Ed





"John Belli" <jab@nospam.nospam>wrote in message

Quote
On Sun, 30 Jul 2006 14:42:35 -0400, "Edward Mitchell"

<EELMitchell@newsgroup.nospam>wrote:



>I enter the variable name as m_sQQQ (so I won't miss it anywhere) and

>click

>on Finish. No sign of this new variable anywhere in the Current Project.



I had this problem when I caused a parse error in the class

header file (I was rearranging declarations and dropped a

semicolon, I think). Check that you haven't done the same.





JAB

--

John Belli

Software Engineer

Refrigerated Transport Electronics, Inc.





-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

Quote
It was unfortunate that the wizard appeared to do it's thing but failed

silently.



You're telling me - I'd say that was a bug! It's pretty poor behaviour

by anyone's standard.



Dave

-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

Quote
>It was unfortunate that the wizard appeared to do it's thing but failed

>silently.



You're telling me - I'd say that was a bug! It's pretty poor behaviour

by anyone's standard.



In fact if I were you I'd get back to MS support and ask them if they

can try to get that fixed in a future update - it really shouldn't

fail silently no matter what the circumstance.



Dave

-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

On Tue, 01 Aug 2006 00:22:48 +0100, David Lowndes wrote:



Quote
You're telling me - I'd say that was a bug! It's pretty poor behaviour

by anyone's standard.



No worse than changing the name of the only form in your app and

Visual Studio managing to change every occurrence except the one where

you actually create the form :-)





--

Bob Moore

bobmoore.mvps.org/">bobmoore.mvps.org/

(this is a non-commercial site and does not accept advertising)

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

Do not reply via email unless specifically requested to do so.

Unsolicited email is NOT welcome and will go unanswered.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

Dave,



Thanks for suggesting that I ask for bug status. It was clearly my problem

to my mind. MS Support made the incident non-decrement :)



Ed



"David Lowndes" <DavidL@example.invalid>wrote in message

Quote
>>It was unfortunate that the wizard appeared to do it's thing but failed

>>silently.

>

>You're telling me - I'd say that was a bug! It's pretty poor behaviour

>by anyone's standard.



In fact if I were you I'd get back to MS support and ask them if they

can try to get that fixed in a future update - it really shouldn't

fail silently no matter what the circumstance.



Dave





-

Re:Add Variable to dialog in VS.NET2005 works differently than (fails) VS.NET2003

Quote
Thanks for suggesting that I ask for bug status. It was clearly my problem

to my mind.



No, it's MS's problem...



Quote
MS Support made the incident non-decrement :)



... they might not have done that otherwise!



Dave

-