473,386 Members | 1,720 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

Missing property? Or a Blonde moment?

I'm trying to write a plugin for visual studio, but I've hit a snag with a
property that should be there, but kind of isn't.

private bool IsProjectThemed( EnvDTE.Project project )
{
try
{
if ( project.Globals.get_VariableExists( m_themedFlagName ) )
{
return ( project.Globals.VariableValue( m_themedFlagName ) ==
true );
}
else
{
return false;
}
}
catch ( Exception )
{
return false;
}
}
But apparently...

'EnvDTE.Globals' does not contain a definition for 'VariableValue'

But according to MSDN, it should be there. Any suggestions?
Cheers,

4Space
Jul 21 '05 #1
2 1321
This is off the cuff - but
if I remember correctly -

EnvDTE has a dte property that has the variableValue in it.

or you has to delare the EnvDTE dte and use it like that

you are correct I pulled my hiar out looking for it also
"4Space" <4S****@NoSpam.com> wrote in message
news:uX**********************@news.easynews.com...
I'm trying to write a plugin for visual studio, but I've hit a snag with a
property that should be there, but kind of isn't.

private bool IsProjectThemed( EnvDTE.Project project )
{
try
{
if ( project.Globals.get_VariableExists( m_themedFlagName ) )
{
return ( project.Globals.VariableValue( m_themedFlagName ) ==
true );
}
else
{
return false;
}
}
catch ( Exception )
{
return false;
}
}
But apparently...

'EnvDTE.Globals' does not contain a definition for 'VariableValue'

But according to MSDN, it should be there. Any suggestions?
Cheers,

4Space

Jul 21 '05 #2
Hi,

Thanks for your post. The reason why you did not find the VariableValue
property of Globals is that VariableValue is the default member attribute
of Globals and it is shown as the following definition in the Object
Browser:

public const abstract new object this [ get, set ]
Member of EnvDTE.Globals

So we are able to access the VariableValue with the code as shown below:
project.Globals[m_themedFlagName]

Hope this helps.

Regards,

HuangTM
Microsoft Online Partner Support
MCSE/MCSD

Get Secure! -- www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.

Jul 21 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

29
by: shank | last post by:
1) I'm getting this error: Syntax error (missing operator) in query expression on the below statement. Can I get some advice. 2) I searched ASPFAQ and came up blank. Where can find the "rules"...
4
by: RICHARD BROMBERG | last post by:
I am using CDONTS in an ASP program to accept input from a Form and send an E-mail. The form includes the following as well as some other information : From (the name of the...
12
by: Terry Olson | last post by:
I need to do a if statement on only textfields that have a number in them other then zero. What is the best way to filter out all field values other then numbers other then zero? I haven't had any...
2
by: 4Space | last post by:
I'm trying to write a plugin for visual studio, but I've hit a snag with a property that should be there, but kind of isn't. private bool IsProjectThemed( EnvDTE.Project project ) { try { if...
2
by: garyusenet | last post by:
I could do with something similiar, can you tell me if you think this would work for me, and if there's any advantage in working with controls this way than how I currently am. At the moment...
3
by: zazu | last post by:
We have a database that can be accessed by a small number of users on a small network. The database is on the server. One form has a combo box with a large number of selections. Usually there is a...
7
by: =?Utf-8?B?QU9UWCBTYW4gQW50b25pbw==?= | last post by:
Hi, I have been using the code (some of it has been removed for simplicity) below to allow authenticated (using ASP.NET membership database) users to get a file from their archive area. It...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.