Posted 13 years ago by Kevin Bennett
Avatar
I use the SyntaxEditor document header and footers to define the basic structure for a class in VB.

For example:

HeaderText:
Public Class MyClass
Public Sub Run()

FooterText:
End Sub
End Class


In the Syntax Editor, I type in something like:

Dim s as

And Intelliprompt will kick up for the type specification. Let's say I pick String. Then on the next line try to use my string, like so:

Dim s as String
s.

No Intelliprompt will show up. Regardless of what type I declare in the first line, it will not show up.

I catch the SyntaxEditorIntelliPromptMemberListPreFilter event. In the VBContext that is passed into the IntelliPromptMemberListPreFilterEventArgs, the Type comes in as 'None'.

Any Ideas?
I can send the full example if need be.

Comments (4)

Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Hi Kevin,

I think the problem here is that MyClass is being interpreted as a keyword. If you make it MyClass2 or any other non-keyword identifier it seems to work. I'm testing with our Code Fragments sample.


Actipro Software Support

Posted 13 years ago by Kevin Bennett
Avatar
That was one issue. But even after that it still wasn't working for me.

Turns out that an extra line-feed is needed in the Footer text for some reason.

I mean, even if Document.Text ends with a line-feed, then Document.FooterText still needs to start with a line-feed.

Strange, but it's working now.
Posted 13 years ago by Actipro Software Support - Cleveland, OH, USA
Avatar
Keep in mind VB uses line terminators for delimiting statements. So you MUST include a line feed at the end of the header text and at the start of the footer text to ensure it all gets parsed correctly, since at run-time the header and footer text is pre- and post-pended to the document's text directly for parsing.

[Modified at 01/05/2011 03:53 PM]


Actipro Software Support

Posted 13 years ago by Kevin Bennett
Avatar
Got it. Thanks for the help.

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

Add Comment

Please log in to a validated account to post comments.