Quirkiness surrounding with statements and intellisense

SyntaxEditor for Windows Forms Forum

Posted 9 years ago by Steven Nielson - Software Developer Lead, Microfocus
Version: 4.0.0284
Platform: Products
Environment: Windows XP (32-bit)
1. Open sample application.
2. Select .NET Language Reflection QuickStart
3. Select AnotherInheritedControl.vb tab
4. Select all text and delete
5. Paste the following code snippet:

Imports System

Public Module Main
Public Sub Main()
dim arr() as String = {"Hello", "World" }
With arr

End With
End Sub
End Module

6. Type a . at the end of the With arr line
7. Verify that no intellisense is reported
8. Remove . from the line
9. Comment out End With statement
10. Repeat line 6
11. Verify that intellisense is now reported

I have also seen some cases where starting a line with a . inside of the with block does not bring up the intellisense of the with item. I have not been able to reproduce a simple example for this yet, but it is definitely repeatable with the more complicated example. Here is my current usage:

Imports System
Imports SilkTest.Ntf

Public Module Main
Public _desktop As Desktop = Agent.Desktop

Public Sub Main()
With _desktop.Window("Untitled - Notepad")
.MenuItem("About Notepad").Select()
.Dialog("About Notepad").PushButton("OK").Select()
End With
End Sub
End Module

I can only get intellisense on the With _desktop.Window("Untitled - Notepad"). line if I comment out the End With statement. I can not get intellisense inside of the With block when starting a line with . operator. Also, the .TextField(). gives me the static class members, but not the instance members. If I were to write the line _desktop.Window("Untitled - Notepad").TextField(). , I would get all of my instance members as well.

Comments (1)

Posted 9 years ago by Actipro Software Support - Cleveland, OH, USA
Hi Steven,

Thanks for the note, we've improved IntelliPrompt in unterminated statement blocks for the next maintenance release.

Actipro Software Support

The latest build of this product (v2018.1 build 0341) was released 3 months ago, which was after the last post in this thread.

Add Comment

Please log in to a validated account to post comments.