7 : Document command is not available (Notes Client)

Hi,

I am using a NotesTimer class to reload the top frame on my frameset every 5 sec. The top frame displays the current time. The code in the event handler is as simple as below.

Dim ws As New NotesUIWorkspace

Dim uidoc As NotesUIDocument

Set uidoc = ws.CurrentDocument

If Not uidoc Is Nothing Then

Call uidoc.Refresh()

End If

When i am navigating through the db and have some other form open, the clock on the top frame stops and the document does not refresh. If i click on the top frame such that the focus is now there, the clock starts again and refreshes every 5 secs.

After sometime i get the error “Document command is not available” (err num 7, 9) at the line uidoc.refresh. As can be noted from the code above, i am first checking if i have a handle to the uidoc…its just that the refresh command cannot be used. I am using the Notes Client.

Any ideas ?

Subject: 7 : Document command is not available (Notes Client)

first guess is, that ws.currentdocument just gets the wrong doc/handle. if you get a uidoc that’s not in edit-mode you might get this error…

Subject: RE: 7 : Document command is not available (Notes Client)

i thought of the same thing initially, but my form is always in an edit mode…and the notestimer is created in the post open of the form

Subject: RE: 7 : Document command is not available (Notes Client)

the clock stops when i open some other document or form. starts again only if i click on the top frame (i.e. being the focus back there). is there anyway to tackle this ?

Subject: RE: 7 : Document command is not available (Notes Client)

it will be hard to get results when using notestimer combined with frames.

i’ve seen reports that this can freeze the client.

sorry, i have no idea how to avoid timer from stopping…

Markus Seitz

markus.seitz@icodex.com

http://wwww.icodex.com/people