473,406 Members | 2,707 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,406 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
Nov 15 '05 #1
2 1169
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

Nov 15 '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.

Nov 15 '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"...
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...
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...
0
by: James Manila Dot Net | last post by:
I've been having a major problem using the Rtf property of the Richtextbox. I use the RTB to generate RTF code to save it in an access database. I'm successfully able to do this. However, the...
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

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.