ChadSmiley Blog Things about family, life, coding, and more

30Dec/051

Some findings

If you are looking for a couch (not DbCouch ) and in need of a bike check out this couch bike . via: hack a day .  If you are into history instead then try Microsoft's Historical Monuments , sorry but I have not tried it yet.  How about photography or some sketches then check out G-Man and his journal .

I have also added a new album of our deck that I built in 2003, a little late.  My wife and I design the deck and I built it with the help of friends and family.  I used Trex and so far it has held up very nice, if can afford it.

Tagged as: , 1 Comment
28Dec/050

Proverbs 29:15-17

15-The rod and rebuke give wisdom,
But a child left to himself brings shame to his mother.
16-When the wicked are multiplied, transgression increases;
But the righteous will see their fall.
17-Correct your son, and he will give you rest;
Yes, he will give delight to your soul.
Tagged as: No Comments
26Dec/052

Merry Christmas

I pray that everyone had a Merry Christmas.  This was the year of electronics, now that my boys are getting a little older (9,7,4,4) the need for electronic toys has arrived.  Ezra, 7, got a Play TV Football .  Calvin, got his own CD of Toby Mac so he also received a CD player also.  Josh & Jared received a Monster Tumbler, they are actually kind of cool because the wheels line up.

Gary, I beat you!!!!

Filed under: Family 2 Comments
22Dec/057

Domino Document Locking Class 1.1

Updated version of Document Locking Class is now available.

Here is an update to the Document Locking Class:

Public Sub new(  inDoc As Variant )
Public Sub SetCurrentUser( user As String )
Public Function hasDocument()
Public Sub setDocument( inDoc As NotesDocument )
Public Sub setUIDocument( inUIDoc As NotesUIDocument )
Public Property Get toString As String
Public Property Get ShowPrompts As Boolean
Public Property Set ShowPrompts As Boolean
Public Function LockingEnabled() As Boolean
Public Function IsLockedByCurrentUser () As Boolean
Public Function IsDocumentLockedByCurrentUser (doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLockedByCurrentUser ( uiDoc As NotesUIDocument ) As Boolean
Public Function LockedBy ( ) As String
Public Function IsLocked ( ) As Boolean
Public Function IsDocumentLocked ( doc As NotesDocument ) As Boolean
Public Function IsUIDocumentLocked (uiDoc As NotesUIDocument ) As Boolean
Public Function Lock() As Boolean
Public Function LockUIDocument (uiDoc As NotesUIDocument ) As Boolean
Public Function LockDocument (doc As NotesDocument ) As Boolean
Public Function UnLock () As Boolean
Public Function UnLockUIDocument (uiDoc As NotesUIDocument ) As Boolean
Public Function UnLockDocument (doc As NotesDocument ) As Boolean

Domino Document Locking

%INCLUDE "LSCONST.LSS"
 
'/**
' * A rapper around the built-in document locking that is available in Notes/Domino 6.
' *	The purpose is to provide a better more consistant way of locking and unlocking documents.
' *	Will not lock a new document since it can not be locked.  Will only show warnings once.
' *
' *	@author	Chad Schelfhout		http://www.chadsmiley.com/
' *	@version	1.1
' */
Class DominoDocumentLocking
	Private pUser As String
	Private pDoc As NotesDocument
	Private pToString As String 
	Private pShowPrompts As Boolean
	Private pDatabase_Locking_Not_Enabled As String
	Private pDatabase_Locking_Not_Enabled_Title As String
	Private pDocument_Locked As String
	Private pDocument_Locked_Title As String
	Private pEnabled As Boolean
	Private pAlreadyLocked As Boolean
	'Flag used so user is only informed once that database locking is not enabled	
	Private pDatabasePrompted As Boolean
 
	'/**
	' * Constructor
	' */
	Public Sub new( inDoc As Variant )
		pDatabase_Locking_Not_Enabled = "Database locking has not been enabled."
		pDatabase_Locking_Not_Enabled_Title = "Locking Not Enabled"
		pDocument_Locked = "Unable to lock, currently locked by: "
		pDocument_Locked_Title = "Document Locked"
		pDatabasePrompted = False
		pAlreadyLocked = False
		pShowPrompts = True
		pToString = ""
		If Not inDoc Is Nothing Then
			If Typename( inDoc ) = "NOTESDOCUMENT" Then
				Set pDoc = inDoc
			Elseif Typename( inDoc ) = "NOTESUIDOCUMENT" Then
				Set pDoc = inDoc.Document
			End If
		End If
 
		Dim Session As New NotesSession
		pUser = Session.UserName 
		If Session.CurrentDatabase.IsDocumentLockingEnabled Then
			pEnabled = True
		Else
			pEnabled = False
		End If
	End Sub
 
	'/**
	' * Determines if the document is locked 
	' */
	Private Function HasLock ( ) As Boolean
		If pDoc Is Nothing Then
			HasLock = True
		Else
			'if there is no text then it is not locked
			HasLock = Len( pDoc.LockHolders(0) ) > 0
		End If
	End Function
 
	'/**
	' * Gets the current user
	' */
	Private Property Get CurrentUser As String
		CurrentUser = pUser
	End Property
	'/**
	' * Gets the current user
	' */
	Public Sub SetCurrentUser( user As String )
		pUser = user
	End Sub
	'/**
	' * Determines if the document is locked but the current user.
	' */
	Private Function CurrentUserHasLock( ) As Boolean
		CurrentUserHasLock = HasLock ()
		If CurrentUserHasLock Then
			If pDoc.LockHolders(0) = pUser Then
				CurrentUserHasLock = True
			Else	'Not the current user.
				CurrentUserHasLock = False
			End If
		End If
	End Function
 
	'/**
	' * Determines if a document exists
	' */
	Public Function hasDocument()
		hasDocument = Not pDoc Is Nothing
	End Function
	'/**
	' * Sets the Document
	' */
	Public Sub setDocument( inDoc As NotesDocument )
		Set pDoc = inDoc	
	End Sub
	'/**
	' * Sets the document base on the UI document
	' */
	Public Sub setUIDocument( inUIDoc As NotesUIDocument )
		If inUIDoc Is Nothing Then
			Call setDocument( inUIDoc.Document )
		End If
	End Sub
 
	'/**
	' * Returns string of any messages
	' */
	Public Property Get toString As String
		toString = pToString
	End Property
 
	'/**
	' * Returns wether prompts are displayed
	' */
	Public Property Get ShowPrompts As Boolean
		ShowPrompts = pShowPrompts
	End Property
	'/**
	' * Sets wether prompts are displayed
	' */
	Public Property Set ShowPrompts As Boolean
		pShowPrompts = ShowPrompts
	End Property
 
	'/**
	' * Determines if database locking is enabled.
	' */
	Public Function LockingEnabled() As Boolean
		If Not pEnabled Then
			If Not pDatabasePrompted Then
				pToString = pDatabase_Locking_Not_Enabled
				If showPrompts Then
					Msgbox pToString , MB_ICONSTOP , pDatabase_Locking_Not_Enabled_Title
				End If
				pDatabasePrompted = True
			End If
		End If
		LockingEnabled = pEnabled
	End Function
 
	'/**
	' * Determines if the current document is locked by the current user.
	' */
	Public Function IsLockedByCurrentUser () As Boolean
		IsLockedByCurrentUser = LockingEnabled()
		If IsLockedByCurrentUser Then
			IsLockedByCurrentUser = CurrentUserHasLock( )
		Else	'Locking not enabled
			IsLockedByCurrentUser = False
		End If
	End Function	
	'/**
	' * Determines if the document is locked but the current user.
	' */
	Public Function IsDocumentLockedByCurrentUser (doc As NotesDocument ) As Boolean
		Call SetDocument( doc )
		IsDocumentLockedByCurrentUser = IsLockedByCurrentUser
	End Function
 
	'/**
	' * Determines if the UI document is locked but the current user.
	' */
	Public Function IsUIDocumentLockedByCurrentUser ( uiDoc As NotesUIDocument ) As Boolean
		Call setUIDocument( uiDoc )
		IsUIDocumentLockedByCurrentUser = IsLockedByCurrentUser(  )
	End Function
 
	'/**
	' * Returns who the document is locked by 
	' */
	Public Function LockedBy ( ) As String
		If hasDocument() Then
			LockedBy = pDoc.LockHolders(0)
		Else
			LockedBy = ""
		End If
	End Function
	'/**
	' * Determines if the currnet document is locked 
	' */
	Public Function IsLocked ( ) As Boolean
		isLocked = LockingEnabled()
		If isLocked Then
			isLocked = HasLock( )
		Else	'Locking is not enabled
			isLocked = False
		End If
	End Function
	'/**
	' * Determines if the the document is locked 
	' */
	Public Function IsDocumentLocked ( doc As NotesDocument ) As Boolean
		Call setDocument( doc ) 
		isDocumentLocked = IsLocked()
	End Function
	'/**
	' * Determines if the UI document is locked 
	' */
	Public 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 current document
	' */
	Public Function Lock() As Boolean
		Me.Lock = LockingEnabled()
		If Me.Lock Then	'Check to make locking is enabled.
			If Not pAlreadyLocked Then	'Make sure that the document is not allready locked.
				If HasLock( ) Then
					If CurrentUserHasLock( ) Then
						'Since the current user has the document locked then we don't need to.
						pAlreadyLocked = True
						Me.Lock = True
					Else
						'Document is locked by someone else.  Let's display the name
						pToString = pDocument_Locked + pDoc.LockHolders(0)
						If showPrompts Then
							Msgbox pToString , MB_ICONSTOP, pDocument_Locked_Title 
						End If
						Me.Lock = False
					End If
				Else
					'Make sure that there is a document to lock, New documents can not be locked.
					If Not pDoc.IsNewNote Then
						Call pdoc.Lock
					End If
					pAlreadyLocked = True
					Me.Lock = True
				End If
			End If
		End If
	End Function
	'/**
	' * Locks the UI document
	' */
	Public Function LockUIDocument (uiDoc As NotesUIDocument ) As Boolean
		Call setUIDocument( uiDoc )
		LockUIDocument = Me.Lock()
	End Function
 
	'/**
	' * Locks the document
	' */
	Public Function LockDocument (doc As NotesDocument ) As Boolean
		Call setDocument ( doc ) 
		LockDocument = Me.Lock()
	End Function
 
	'/**
	' *  Unlocks the current document
	' */
	Public Function UnLock () As Boolean
		Me.UnLock = False
		If Not pDoc Is Nothing Then
			If Not pDoc.IsNewNote Then
				If CurrentUserHasLock(  ) Then	'Only unlock if the current user has it locked.
					pDoc.UnLock
					Me.UnLock = True
				End If
			End If
		End If
	End Function
	'/**
	' *  Unlocks the UI document
	' */
	Public Function UnLockUIDocument (uiDoc As NotesUIDocument ) As Boolean
		Call setUIDocument( uiDoc )
		UnLockUIDocument = Me.UnLock()
	End Function
 
	'/**
	' * Unlocks the document
	' */
	Public Function UnLockDocument (doc As NotesDocument ) As Boolean
		Call setDocument( doc )
		UnLockDocument = Me.UnLock()
	End Function
 
End Class
17Dec/050

Welcome and ScriptBrowser

Welcome Craig Schumann (the blog with no name) to Blogsphere.  Craig has also release a new version of Teamstudio ScriptBrowser.

15Dec/050

iTunes sync with SD memory card

No, I do not have an iPod, but I would like to sync my music from iTunes to my memory card to play on my ViewSonic .  I was using Windows Media Player for a while but did not like how it would sync the songs.  It would sync the first songs in the list and never reach any songs at the end.  I am looking for a tool that I would be able to specify recycle percentage like 10% or 20% of the songs each time I sync.  Is there anything available that can do this?

Tagged as: , No Comments
14Dec/052

a workshop in a mess (Firefox Extensions)

SwiftTabs is a very nice Firefox extension that might take a little getting used to but could save you time.  In this case the picture speaks a 1,000 words (even though there is only 91 words on the picture), because it describes exactly what it does.  Just install the extension and give it a try for a couple of weeks.  There are a couple other extensions at ' a workshop in a mess ' that might be of interest like LiveLines or Localite-Mod .

Tagged as: , 2 Comments
12Dec/050

Quick Elementer 2.4.0 at openNTF.org

Version 2.4.0 has been released .  Yes, I was not planning on making any more improvements but there was a couple little things that was bothering me as I started implementing the new release at work.  I would like to add one more feature which would keep the titles up to date.  Then ND7 design elements will be implemented.
New Features:

  • Renamed Quick Elementer to Quick Elementer Design, alias is still Quick Elementer
  • Allow the clearing of list boxes.
  • Allow sub categories for Quick Elementer Design and Quick Elementer Code
9Dec/050

My Firefox Extensions

Johan listed his extensions, that I just installed.  Here are a couple that I have in addtion:

Just found out that Firefox will show the source of just the part that is selected. Not sure if the is standard feature or is apart of the many extensions that I am using. Regardless, very nice feature.

Tagged as: , No Comments
7Dec/050

Quick Elementer 2.3.0 at openNTF.org

Version 2.3.0 has been released .  It has been almost 5 months since 2.2.0 .  I had not planned on any more improvements but the UI just need some work.  The two list boxes where not working.  The next release will be to implement the new ND7 design elements.
New Features:

  • Use of views to select design elements
  • Widen the list box of selected design elements
  • Added Authors field to Quick Elementer Code
  • 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