SelectDocument in Debug mode

It seems so as if the debugger does not support the use of the Command UIview.Selelct Document.

The following snippet is not debuggable with this debugger, but runs well if not debugged:

Sub Postopen(Source As Notesuiview)

Dim doc As Notesdocument

Dim entry As NotesViewEntry

     'All Variables which start with 

     'an I are defined in Global

Set Iview=db.getview(“(IconvvcC)”)

Set Icoll=IView.AllEntries

Set entry=Icoll.GetfirstEntry

Set doc=entry.Document

iUnid$=Doc.universalID

Call Source.SelectDocument(doc )

. . .

The Select Document command lets the Debugger raise an error message “Command not available !” and further debugging of the sub Postopen is not possible.

Seems as if the debugger doesn’t know this command !?

Joe Herrmann


For a successful technology, reality must take precedence over public relations, for nature cannot be fooled. (Richard P. Feynman)

Subject: Debugging with a NotesUIView object

Howdy,

I found a kludgy work around for this bug.

It seems that Notes remembers the uiview information if you are close enough to it.

By putting the following code in a button on the view action bar, I am able to debug:

Dim s as New NotesSession

Dim w as New NotesWorkspace

dim uiView as NotesUIView

dim sView as String

Set uiView = w.Currentview

sView = uiView.ViewName

Stop

Call [ExportRoutine](“Selected”, sView)

After I click the button in debug mode at the first line of code, I hit the “Continue”. The code then stops at the Stop command and at that point it has already identified and captured the uiView information.

If I try to run the same code in debug mode, it throws an “Object variable not set” on the Set uiView statement.

I tried the same code in an agent, and it failed, but it appears that as long as you capture the uiView name in the code of an action button on the view itself, it will work.

If you are working with selected documents from the view, this will not be a problem, because the selected documents are obtained from the database.unprocesseddocuments property. In my case, I was exporting the view and needed the view name to get the column information.

Hope this helps someone. And if someone finds a better work around, please share it.

Best regards,

Gail Spurlock