M
Mark Sicignano
I found the reason for at least one of the script bugs that appear in the
Add Member Variable Wizard.
This is a followup to a 9-month old article.
Dave V said:
I'm getting the same error at line1643 and using Visual Studio .NET 2003.
I get it when going into the "Add Member Variable Wizard" and I tracked it
down to this line in my source:
DDV_MinMaxInt(pDX, m_Hours[0], 0, HOURS_DAY - 1);
If I remove the "- 1", then I do not get the scripting error. It would
appear that the script, when parsing the DDX and DDV calls, cannot handle a
more complex expression because the following line works just fine.
DDV_MinMaxInt(pDX, m_Hours[0], 0, HOURS_DAY);
Hmmm.
const int hours = HOURS_DAY - 1;
DDV_MinMaxInt(pDX, m_Hours[0], 0, hours);
also seems to to work fine, so I guess that's what I'll have to do, as I
have about 10 of these spin controls on my dialog.
I hope this helps others. Before assuming that your VS.NET installation is
corrupted and doing a reinstallation as some have suggested, try doing a
little debugging as to what can be causing the scripts in the wizard to
choke when parsing your source code.
-mark
Add Member Variable Wizard.
This is a followup to a 9-month old article.
Dave V said:
An error has occurred in the script of this page
Line: 1635
Char: 3
Error: Unexpected call to method or property access
Code: 0
URL: file://E:\Program Files\Microsoft Visual Studio .NET\Vc7\VCWizards
\MemVariableWiz\HTML\1033\default.htm
I'm getting the same error at line1643 and using Visual Studio .NET 2003.
I get it when going into the "Add Member Variable Wizard" and I tracked it
down to this line in my source:
DDV_MinMaxInt(pDX, m_Hours[0], 0, HOURS_DAY - 1);
If I remove the "- 1", then I do not get the scripting error. It would
appear that the script, when parsing the DDX and DDV calls, cannot handle a
more complex expression because the following line works just fine.
DDV_MinMaxInt(pDX, m_Hours[0], 0, HOURS_DAY);
Hmmm.
const int hours = HOURS_DAY - 1;
DDV_MinMaxInt(pDX, m_Hours[0], 0, hours);
also seems to to work fine, so I guess that's what I'll have to do, as I
have about 10 of these spin controls on my dialog.
I hope this helps others. Before assuming that your VS.NET installation is
corrupted and doing a reinstallation as some have suggested, try doing a
little debugging as to what can be causing the scripts in the wizard to
choke when parsing your source code.
-mark