LotusScript.doc has been released and is available for download from the LotusScript.doc website…
A special thank to those who have helped me test out the application, submitted code or patches.
LotusScript.doc has been released and is available for download from the LotusScript.doc website…
A special thank to those who have helped me test out the application, submitted code or patches.
I sent the article draft back to my editor at The VIEW yesterday and I must admit I was a little surprised as to the number of corrections she had made and that I had to look at. I ended up writing quite a lot of new content both clarifying existing points and making new ones.
It will be exciting to hear her thoughts on the added content.
Release candidate 2 is just about to be released. The release contains a number of big improvements which include support for %INCLUDE files (also if nested), support for Page design elements and support for the Shared Actions design element.
Refer to to the changelog below for details on all improvements and bug fixes.
Thanks to all submitting comments, bug reports etc.
CHANGELOG – Release candidate 2
Fixes
Improvements
When I wrote that I wouldn’t be adding more features before the release I must have been dreaming… I just couldn’t resist adding code that make it possible to see the known sub-classes of a particular class when browsing the documentation.
This makes it much easier to navigate to the sub-classes of an “interface-style” super-class as shown above where “SaveDecorator” is actually just describing the interface for the “NoAttachmentsSaveDecorator”- and “ReferencesSaveDecorator”-classes.
All this information in just 10 lines of added code – I love objects!!
I just shot of an e-mail with LotusScript.doc release candidate 1 to the “beta” testers a few moments ago. This will hopefully be the last release for general release – changelog below.
Fixes
Improvements
I know there are some outstanding feature requests but I would rather get the tool out now than keep adding new features. I hope for your understanding.
I just received the first draft back from “my” editor at The View with the first round of edits for my upcoming article. The article is on LotusScript.doc and will be published in the November/December issue of The View.
I’m VERY exited – my first article…
A Bag is a collection that keeps track of the number of times each element occurs in the collection. The name was inspired by the Bag implementation from the Apache Jakarta Commons Collections.
Please note that this is a quick implementation and it only handles simple datatypes – no support for objects at present.
The code is of cause documented using LotusScript.doc… 🙂
'/**
' * Implementation of a bag that is a collection that keeps track of the
' * number of times an element occurs in a collection.
' */
Public Class Bag
'declarations
Private pElements As Vector
Private pElementCount List As Integer
'/**
' * Constructor.
' */
Public Sub New()
Set Me.pElements = New Vector()
End Sub
'/**
' * Adds an element to the bag.
' * @param e The element to add.
' */
Public Sub AddElement(e As Variant)
'declarations
Dim hash_e As Variant
'add the element to the vector
Call Me.pElements.AddElement(e)
'do we have a count for this already
If Not Iselement(Me.pElementCount(e)) Then
'we do not have a count
Me.pElementCount(e) = 1
Else
Me.pElementCount(e) = Me.pElementCount(e) + 1
End If
End Sub
'/**
' * Get a count of the number of times an element occurs in the bag.
' *
' * @param e The element for look for.
' * @return Count of the times the element occurs (0 if it doesn't occur)
' */
Public Function GetCount(e As Variant) As Long
'declarations
Dim hash_e As Variant
If Not Iselement(Me.pElementCount(e)) Then
GetCount = 0
Else
GetCount = Me.pElementCount(e)
End If
End Function
'/**
' * Returns an array of the unique elements added.
' *
' * @return Array of unique elements added.
' */
Public Function GetUnique() As Variant
Dim v() As Variant
Dim i As Integer
Forall k In Me.pElementCount
Redim Preserve v(i)
v(i) = Listtag(k)
i = i + 1
End Forall
GetUnique = v
End Function
End Class
Small fix to the removeElementAt(Integer) method – changes in bold.
Public Function removeElementAt(index As Integer)
If index >= Me.size() Then Error 2000, "Array index [" & index & "] out of bounds [" & size & "]"
Dim members As Variant
Dim i As Integer
Dim j As Integer
Redim members(Me.size())
j=0
For i = 0 To Me.size-1
If (i index) And (Not j > Me.size()) Then
If Isobject(array(i)) Then
Set members(j) = array(i)
Else
members(j) = array(i)
End If
j = j + 1
End If
Next i
elementLength = elementLength - 1
array = members
End Function
More information at the EclipseZone…
The below excerpt is from the article “All about AutoSave in Lotus Notes/Domino 7” on Lotus Developer Domain:
Only documents created from forms with Allow AutoSave selected can be autosaved. This is the only way to ensure that the document can be recovered after it has been autosaved. Many Notes/Domino applications have code in their Save and Post Save events that create items, or perform validations that are checked at load time. Because we can’t execute these events while autosaving the document, none of this will take place, and the autosaved document will be in a “bad” state. This could lead to failing to load the document after recovery.
If your application does write items on save events, and its dependant upon these item, you may need to add code in your Query Open event to put defaults for those items. You can even do special handling only for documents that are recovered by looking for an item called $AutoSaveRecovered. This item will only be available for recovered documents up until the Post Open event, and will be deleted after that.
Another way to programmatically disable AutoSave on individual documents is by adding the item $DontAutosave. This item prevents AutoSave on that document. If you remove $DontAutosave, the document can again be autosaved.
NOTE: In Notes/Domino 7.0, the only shipping template form that is enabled for AutoSave is the Memo form.
Nice to know that fields has been added to detect whether a document is being recovered via AutoSave.