Quantcast
Channel: Visual Studio Integrate forum
Viewing all articles
Browse latest Browse all 4410

"Walkthrough: Displaying Statement Completion" does not work

$
0
0

Hello,

I've been trying to get the code from the walkthrough named "Displaying Statement Completion" to work, but I'm at a loss as to why it doesn't.

First I'd like to mention that there is an error within the walkthrough, easily overcome but still kind of annoying when it is the first walkthrough that you try to do. The walkthrough mentions that you need to create a file called "TestCompletionCommandHandler", but it then tells you to fill this file with a class named "TestCompletionHandlerProvider". The file that you have to create after it, is again called "TestCompletionCommandHandler", which is then correctly filled with the class by the same name. Obviously the first file that you need to create, should be called "TestCompletionHandlerProvider" and not"TestCompletionCommandHandler".

Second, when you implement the code as mentioned in the walkthrough, you start it up, type a character, you will immediately get a NullReferenceException after the line "this.TriggerCompletion()" (line 79). If I debug it, I can see that session.Start is called and immediately the OnSessionDismissed method is called, setting the session to null, which in turn will cause the NullReferenceException later on. Also, during debugging, I see thatTryCreateCompletionSource (in class TestCompletionSourceProvider) is never called. I assume that has something to do withwhy the session is dismissed immediately, because there are no completions to do, but why it is not called, I don't know.

Does anyone have an idea as to why this is not working?

I'm using Visual Studio 2013 on Windows 8.1 Pro.



Viewing all articles
Browse latest Browse all 4410

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>