Quick Elementer 2.3 and BlogSphere RichText
The next release of Quick Elementer is just around the corner. If I can get it done before I go on vacation.
It has been delayed because I have been enhancing BlogSphere's Rich Text publishing. My first anniversary of this blog also used the new Rich Text publishing, but lacked some of the advanced formatting, but it was a good test. Below I have added a list of improvements to test/demonstrate how the two back to back outlines will be published (believe me that don't like that in the current version.
Back to Quick Elementer he major change is how design elements are selected. The two list boxes had some limitations. But when it was originally release one of my goals was to have a small foot print. I have given a little on that goal for better usability. Now design elements will be selected through a picklist. The disadvantage with this is only seeing one design element type at a time.
The form will now only have one list box listing all the selected design elements.
Here is the list of other changes:
New Features:
- Use of views to select design elements
- Widen the list box of selected design elements
- Added LotusScript.doc ( lsdoc.org )
- Added Template Version ( Chris Doig )
Fixes
- Corrected the dynamic list of categories for Quick Elementer
- Corrected the dynamic list of categories for Quick Elementer Code
1st Birthday, the year in review..
One year ago I wrote a greeting to everyone that was reading, which was not much then. The look has not changed, but the interest continues to grow. Here is a look back at some of the more popular posts. In December I released Edit Document Fields 4.1, One Teamstudio Icon and my first attempt at color coding formula language ( in JavaScript ).
February brought Mark's Laugh Your Way, which is a must see for couples. Color coding formula was rewritten in Java and is available online. In March we bought the camera from hell, created an add-in for Domino in Rational Rose, and posted how to create short cuts to shutting down Windows. Once again April was busy with the release of Quick Elementer, and a very popular enhancement to debugging LotusScript. The spring CHEA (Christian Home Educators Association) conference, along with the release Quick Elementer 2.0, and Toolbar Functions.
The camera from hell was fixed with a new cable in June. I also stared working with BlogSphere 2.0 betas, which resulted in me becoming a cook.
More on that later!! Summer projects where in full gear building things. In the heat of the summer I was back to programming (Edit Document Fields 5.1, Quick Elementer 2.2, and Reference Lookup) and some masonry work. Found some cool tools in August that I made simpler.
BlogSphere development took most of my time making some small improvements, testing and helped with the photo album format for the next month. Even after the release of BlogSphere 2.0 I have been working on enhancements and fixing some bugs. This article is written using the new improved Rich Text to MIME conversion, coming soon. I have some improvements I would like to see made to Edit Document Fields and Quick Elementer (almost done) also.
Good thing the links are not in red, other wise it would be bleeding. 
Domino Document Locking Class
Updated version of Document Locking Class is now available.
To easy the pain of working with document locking I created a class that makes life a litlle easier. Here is the list of methods:
Public Sub new() Public Function LockingEnabled() As Boolean Public Function IsDocumentLockedByCurrentUser (doc As NotesDocument ) As Boolean Public Function IsUIDocumentLockedByCurrentUser (uiDoc As NotesUIDocument ) As Boolean Public Function LockUIDocument (uiDoc As NotesUIDocument ) As Boolean Public Function LockDocument (doc As NotesDocument ) As Boolean Public Function UnLockUIDocument (uiDoc As NotesUIDocument ) As Boolean Public Function UnLockDocument (doc As NotesDocument ) As Boolean
So why the class? Easy it did not want have to worry about the if the documents was new, if locking was enabled, and if the document was already locked by the user and I try to lock it again. There is not much else to the code.
So check it out.
Domino Document Locking
%INCLUDE "LSCONST.LSS" '/** ' * A rapper around the built-in document locking that is available in Domino 6. ' * The purpose is to provide a better more consistant way of locking and unlocking documents. ' * Will not try and lock a new document since it can not be locked. Will only show warnings once ' * ' * @author Chad Schelfhout http://www.chadsmiley.com/ ' * @version 1.0 ' */ Class DominoDocumentLocking Private DATABASE_LOCKING_NOT_ENABLED As String Private DATABASE_LOCKING_NOT_ENABLED_TITLE As String Private DOCUMENT_LOCKED As String Private DOCUMENT_LOCKED_TITLE As String Private Enabled As Boolean Private AlreadyLocked As Boolean 'Flag used so user is only informed once that database locking is not enabled Private DatabasePrompted As Boolean Public Sub new() DATABASE_LOCKING_NOT_ENABLED = "Database locking has not been enabled, please call Support Center" DATABASE_LOCKING_NOT_ENABLED_TITLE = "Locking Not Enabled" DOCUMENT_LOCKED = "Unable to lock, currently locked by: " DOCUMENT_LOCKED_TITLE = "Document Locked" DatabasePrompted = False AlreadyLocked = False Enabled = False End Sub '/** ' * Determines if database locking is enabled. ' */ Public Function LockingEnabled() As Boolean Dim Session As New NotesSession If session.CurrentDatabase.IsDocumentLockingEnabled Then Enabled = True Else Enabled = False If Not DatabasePrompted Then Msgbox DATABASE_LOCKING_NOT_ENABLED , MB_ICONSTOP , DATABASE_LOCKING_NOT_ENABLED_TITLE DatabasePrompted = True End If End If LockingEnabled = Enabled End Function '/** ' * Determines if the document is locked ' */ Private Function HasLock( doc As NotesDocument ) As Boolean 'if there is no text then it is not locked HasLock = Len( doc.LockHolders(0) ) > 0 End Function '/** ' * Determines if the document is locked but the current user. ' */ Private Function CurrentUserHasLock( doc As NotesDocument ) As Boolean CurrentUserHasLock = HasLock ( doc ) If CurrentUserHasLock Then If doc.LockHolders(0) = Doc.ParentDatabase.Parent.UserName Then CurrentUserHasLock = True Else 'Not the current user. CurrentUserHasLock = False End If End If End Function '/** ' * Determines if the document is locked but the current user. ' * This is where all the logic is ' */ Public Function IsDocumentLockedByCurrentUser (doc As NotesDocument ) As Boolean IsDocumentLockedByCurrentUser = LockingEnabled() If IsDocumentLockedByCurrentUser Then IsDocumentLockedByCurrentUser = CurrentUserHasLock( doc ) Else 'Locking not enabled IsDocumentLockedByCurrentUser = False End If End Function '/** ' * Determines if the UI document is locked but the current user. ' */ Public Function IsUIDocumentLockedByCurrentUser (uiDoc As NotesUIDocument ) As Boolean 'Check to make sure that there is a document, If there is none it is a new document IsUIDocumentLockedByCurrentUser = ( uiDoc.Document Is Nothing ) If IsUIDocumentLockedByCurrentUser Then IsUIDocumentLockedByCurrentUser= IsDocumentLockedByCurrentUser( uiDoc.Document ) End If End Function '/** ' * Determines if the the document is locked ' * This is where all the logic is ' */ Function IsDocumentLocked (doc As NotesDocument ) As Boolean isDocumentLocked = LockingEnabled() If isDocumentLocked Then isDocumentLocked = HasLock( doc ) Else 'Locking is not enabled isDocumentLocked = False End If End Function '/** ' * Determines if the UI document is locked ' */ Function IsUIDocumentLocked (uiDoc As NotesUIDocument ) As Boolean 'Check to make sure that there is a document, If there is none it is a new document If ( uiDoc.Document Is Nothing ) Then IsUIDocumentLocked = False Else IsUIDocumentLocked= IsDocumentLocked( uiDoc.Document ) End If End Function '/** ' * Locks the UI document ' */ Public Function LockUIDocument (uiDoc As NotesUIDocument ) As Boolean 'Check to make sure that there is a document, If there is none it is a new document LockUIDocument = ( uiDoc.Document Is Nothing ) If LockUIDocument Then LockUIDocument = LockDocument( uiDoc.Document ) End If End Function '/** ' * Locks the document ' */ Public Function LockDocument (doc As NotesDocument ) As Boolean LockDocument = LockingEnabled() If LockDocument Then 'Check to make locking is enabled. If Not AlreadyLocked Then 'Make sure that the document is not allready locked. If HasLock( doc ) Then If CurrentUserHasLock( doc ) Then 'Since the current user has the document locked then we don't need to. AlreadyLocked = True LockDocument = True Else 'Document is locked by someone else. Let's display the name Msgbox DOCUMENT_LOCKED + doc.LockHolders(0) , MB_ICONSTOP, DOCUMENT_LOCKED_TITLE LockDocument = False End If Else 'Make sure that there is a document to lock, New documents can not be locked. If Not Doc.IsNewNote Then Call doc.Lock End If AlreadyLocked = True LockDocument = True End If End If End If End Function '/** ' * Unlocks the UI document ' */ Public Function UnLockUIDocument (uiDoc As NotesUIDocument ) As Boolean UnLockUIDocument = ( uiDoc.Document Is Nothing ) If UnLockUIDocument Then UnLockUIDocument = UnLockDocument( uiDoc.Document ) End If End Function '/** ' * Unlocks the document ' */ Public Function UnLockDocument (doc As NotesDocument ) As Boolean UnLockDocument = False If Not doc Is Nothing Then If Not Doc.IsNewNote Then If CurrentUserHasLock( doc ) Then 'Only unlock if the current user has it locked. doc.UnLock UnLockDocument = True End If End If End If End Function End Class
More produce from the garden
Still more produce from the garden. There is only carrots left now!! 
Documents Stay Locked
All ND6 databases have the ability to enable document locking, which is supposed to help reduce conflicts and inform people who is working with the document. Here is what Lotus has to say about Document Locking:
Note You must be using Lotus Notes 6 and Lotus Domino 6 to use the document locking feature. You must also have an administration server defined in the access control list (ACL). If you do not have an administration server defined in the ACL, you receive an error from Notes. For more information on naming an administration server,
This is all good until clustering or replication is added to the equation. Before adding anything to the equation let me explain the equation. Lotus locks documents using $Writers and $WritersDate to mark who locked the document and when. These fields will be added to the document when the document is put into edit mode. If the document is not on the adminstration server Notes will add the locking fields and replicate the document the administration server. If the document is on the administration server the locking fields are added to the document, but the document is not replicated. Apparently adding the locking fields does not the mark as changed. 
There are a varity of ways that the locking fields can stay around. Here is just one. The document is edit, changed and saved but the document is still in edit mode on the administration server. At this point Domino sees this as a change and replicates the changes throughout the cluster including the locking fields. If the document is then closed later without saving any changes then the locking fields would be removed from the adminstration server. Since the adding and removing of the locking fields are not seen as document changes the document will not be replicated, hence the locking fields on other servers. 
Durring the day I use Toolbar Functions to removed the locking fields. 
At night I use the following code:
FIELD $Writers := @DeleteField;
FIELD $WritersDate := @DeleteField;
Sad but Happy
Received a phone call from a close friends Jason & Vicki this morning. Vicki called to inform us that they where in an accident last night. Their van was hit by a truck driver and their daughter Katie Love was killed but is now in heaven. She was thrown from their van during the accident. Sorry for not getting into all the detail but if you could keep them in your prayers during this time. Can you imagine loosing a son or daughter at the age of 2?
HM
I stumbled across a magazine that I read in collage called Heaven's Metal. It is now called The Hard Music Magazine. They cover hard Christian music like No Innocent Victim this months cover band. The edit even has his own blog.
Here are a couple of Bands that I listened to back in collage that have been featured in HM:
Just to name a few.

