Posted 17 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Version: 4.0.0246
Avatar
Hi,

I'm having some trouble getting the code snippets to work. I keep getting a 'Object reference not set to an instance of an object.' error. This is the code I'm calling:

Dim snippetsFolder As CodeSnippetFolder = New CodeSnippetFolder("VB", Application.StartupPath + "\CodeSnippets\VB")
steEditor.IntelliPrompt.CodeSnippets.ShowInsertSnippetPopup(steEditor.Caret.Offset, "Insert Snippet:", snippetsFolder, CodeSnippetTypes.Expansion)
The snippetsFolder variable is initialising fine, but I get the error attempting to show the popup. Am I doing something wrong??

Regards, Matt

Comments (6)

Posted 17 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Avatar
After further investigation, this error appears to happen only when debugging (stepping through the code). In general use - it working Ok.

Another question - can the snippets be sorted all folders then all items in alphabetical order? Currently it appears to be sorted in alphabetical order, but in a mix of folders and items together. Perhaps I missed as setting??



[Modified at 03/27/2007 05:52 PM]

Regards, Matt

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Could you post code that causes it in our sample project or could you email over a tiny sample project that shows it? It looks like you are doing everything correctly from a glance.


Actipro Software Support

Posted 17 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Avatar
Sure - I'll get something too you soonish...

Regards, Matt

Posted 17 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Avatar
Hi,

I've sent an e-mail to your support address containing a small project that replicates the issue. You just need to make sure your have the breakpoint set and then step through the two lines of code.

Quote:

Another question - can the snippets be sorted all folders then all items in alphabetical order? Currently it appears to be sorted in alphabetical order, but in a mix of folders and items together. Perhaps I missed as setting??


Any thoughts on the above??

[Modified at 03/28/2007 05:09 AM]

Regards, Matt

Posted 17 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Thanks for the sample. The breakpoint was causing the popup to close prematurely and disposed some things that were checked in a later step. I made a fix for the next maintenance release.

As for the other idea, while it is an interesting one, I'm thinking that it would prevent member list items from matching as you type (since they need to be sorted for that to work) and therefore probably isn't something we'll do.


Actipro Software Support

Posted 17 years ago by Matthew Smith - Developer, One Plus One Solutions Pty Limited
Avatar
No probs - glad to be of some help. Thanks for the other response - hadn't considered that. Not any problem, just a though.

Thanks again for a great product.

Regards, Matt

The latest build of this product (v24.1.0) was released 1 month ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.