Re: [Clip] Doc Count Function
From: Art Kocsis <artkns@...>
To: NoteTab-Clips <email@example.com>
Sent: Wed, May 2, 2012 2:03:46 AM
Subject: [Clip] Doc Count Function
Is there a function to return the number of open documents in an instance
of Notetab (i.e., the max valid value of ^!SetDocIndex)?
If not, there should be.
If not, would this be a reliable workaround?
^!Set %curIndx%=^$GetDocIndex$ [Capture current doc index]
^!Document LAST [Switch to last doc]
^!Set %maxIndx%=^$GetDocIndex$ [Save index of last doc]
^!SetDocIndex=^%curIndx% [Switch back to original doc]
[Non-text portions of this message have been removed]
- At 5/2/2012 06:21 AM, Dan Gagne wrote:
>^$GetDocCount$Duh!!! Looked right past it.
>Is there a function to return the number of open documents in an instance
>of Notetab (i.e., the max valid value of ^!SetDocIndex)?
- At 5/2/2012 02:24 AM, Axel wrote:
>Art Kocsis wrote:I don't use DocIndex as a label for a unique doc except to return focus after
> > If not, would this be a reliable workaround?
>Ought to work. I have not yet used DocIndex and I wouldn't want to. From
>the check I just did, whenever I close one document, all the others get
>renumbered so the current index in the current view is not a reliable
>label to use IMHO.
temporarily switching focus to a different one.
DocIndex is obviously not reliable if opening or closing docs but very useful
for looping through all open docs or returning to the original after opening
and operating on a new one. It would be a lot more work to build and use
a list of doc names.