Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

Intellisense Wierdness... Gotta be an obvious answer ?

Posted on 2013-02-03
29
Medium Priority
?
217 Views
Last Modified: 2014-11-12
I downloaded the sdkRawSensorDataVB yesterday and it ran fine on my device.

Copied the Compass code to the app that I'm working on and errors appeared at...

compass.IsSupported
compass.TimeBetweenUpdates
compass.CurrentValueChange
compass.Calibrate
compass.Start()

If I return to the original sample and type compass. to test the properties, event and method that error in my app, there are no intellisense entries for them yet the original code still works !?

Someone please explain how hugely stupid I am being?
0
Comment
Question by:Dodsworth
  • 16
  • 13
29 Comments
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38848554
have you added the component to the references of your project?
have you defined compass?
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38850367
Yes.  Intellisense is aware of my compass object but doesn't display the above properties.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38850590
how did you define the compass object?

what about the reference?
0
Prepare for your VMware VCP6-DCV exam.

Josh Coen and Jason Langer have prepared the latest edition of VCP study guide. Both authors have been working in the IT field for more than a decade, and both hold VMware certifications. This 163-page guide covers all 10 of the exam blueprint sections.

 
LVL 1

Author Comment

by:Dodsworth
ID: 38851219
the compass object is defined in exactly the same way as in the example code (it is the example code!)

Added a reference to Microsoft.Devices.Sensors.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38851226
Does your code compile? Are other objects are correctly showed in Intellisense?
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38851272
wont compile with the properties I listed.  Everything else seems fine.  It just seems strange that if I retype the lines in the demo project then they error also.

Heres the demo project

http://code.msdn.microsoft.com/wpapps/Raw-Sensor-Data-Sample-d84e124d/view/SourceCode

I simply copied the Compass page and added a reference to the project for sensors
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38851281
if it does not compile, it means that you have another problem, surely coming from the references.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38851302
"I simply copied the Compass page and added a reference to the project for sensors"

have you added reference to "Microsoft.Device.Sensors"
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38851397
It doesn't compile because of the missing properties.  

Could you try to reproduce ?

If you open the VB version of the link above, open the compass page and on a line just above

If Not compass.IsSupported Then

Open in new window


type

If compass.i

Open in new window


In my copy there is no intellisense IsSupported property :(
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38851425
I opened the solution in VS2012. I successfully see the intellisense of the compass object.
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38851531
do you see a .IsSupported?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38851551
yes I do as well as IsDataValid, Start, Stop, Calibrate, ...
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38851629
now that is very strange.. the only entry I have begining with the letter I is IsDataValid.  
I also have start and stop but no calibrate?

I tried using the snipping tool to prove that I'm not completely mad but the intellisense helper clears :(

So what could be causing this?

what version of .sensors do you have?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38851716
I loaded the project in VS2012. The reference is set to version 7.0.0.0 found in "C:\Program Files (x86)\Reference Assemblies\Microsoft\Framework\Silverlight\v4.0\Profile\WindowsPhone71\Microsoft.Devices.Sensors.dll"
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38851792
same here

Ideas?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38851926
maybe reinstall the sdk?
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38854696
reinstalled.. no change :(
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38854726
and you are running in VS2012? with the latest updates?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38854728
from the link of your demo app:

"You need to install Windows Phone SDK 7.1 to run this sample"

have you installed the correct SDK?
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38854853
It also says that it can be converted which is what I have done,
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38854862
converted to what?

if you open the sample, the IntelliSense is showing this property?
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38854909
WP8

No .IsSupported
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38854949
I have opened the sample, changed the "target Windows Phone OS Version" from the project properties to WP8 and I still have the IsSupported in my intellisense.

can you try exactly the same thing?
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38855169
Nope not there.. It compiles but does not show in intellisense.
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38855185
is intellisense working for other objects in the same project?
0
 
LVL 70

Expert Comment

by:Éric Moreau
ID: 38855199
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38855632
yes it works for the compass object, just no IsSupported listed.
0
 
LVL 70

Accepted Solution

by:
Éric Moreau earned 2000 total points
ID: 38855663
sorry, your intellisense is screwed up and I don't know how you could fix it other then reinstalling the SDK.

one last thing, maybe you can uninstall/reinstall the sdk.
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 38856124
I did !
0

Featured Post

What is SQL Server and how does it work?

The purpose of this paper is to provide you background on SQL Server. It’s your self-study guide for learning fundamentals. It includes both the history of SQL and its technical basics. Concepts and definitions will form the solid foundation of your future DBA expertise.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In my previous article (http://www.experts-exchange.com/Programming/Languages/.NET/.NET_Framework_3.x/A_4362-Serialization-in-NET-1.html) we saw the basics of serialization and how types/objects can be serialized to Binary format. In this blog we wi…
Wouldn’t it be nice if you could test whether an element is contained in an array by using a Contains method just like the one available on List objects? Wouldn’t it be good if you could write code like this? (CODE) In .NET 3.5, this is possible…
We’ve all felt that sense of false security before—locking down external access to a database or component and feeling like we’ve done all we need to do to secure company data. But that feeling is fleeting. Attacks these days can happen in many w…
Look below the covers at a subform control , and the form that is inside it. Explore properties and see how easy it is to aggregate, get statistics, and synchronize results for your data. A Microsoft Access subform is used to show relevant calcul…
Suggested Courses

824 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question