Jan 31

Quick Elementer 2.5.0 at openNTF.org

Version 2.5.0 has been released.  ND7 design elements have been implemented.
New Features:
  • Added Web Services and Columns as possible design elements to select from
  • Added (Quick Elementer Design Web Services) and (Quick Elementer Design Columns) views
  • Update (Quick Elementer Design Views) view so column design elements would not be listed
  • Update (Quick Elementer Design Agent) view so Web Service design elements would not be listed
  • Updated Quick Elmenter and Quick Elementer Code document to include ND7 for release
Jan 20

Proverbs 21:6-8

6-Getting treasures by a lying tongue
Is the fleeting fantasy of those who seek death.
7-The violence of the wicked will destroy them,
Because they refuse to do justice.
8-The way of a guilty man is perverse;
But as for the pure, his work is right.
Jan 18

SyncToy

Yesterday I was looking for Microsoft’s Tweak UI for XP and stumbled onto a new (at least to me) tool called SyncToy.  There are more power toys some new and old that might be of interest to some.  SyncToy caught my interest with having a memory stick that I like to keep files from work and home synchronized on.  I also have a need at work to back up files that are only backed up for 30 days,  I just lost some documentation that I don’t access that often and was deleted more than 30 days ago..  So I plan on using SyncToy and Windos Scheduled Tasks tool to take a backup of these files onto my machine or a different location on the server. :)  One more thing, there is no registry trail after the tool runs.  I installed it on my home machine and copied the files to my memory stick and launched it at work and nothing was ever added to the registry.  The only trail is the ‘SyncToyData’ folder in your ‘My Documents’ folder where the settings .  
Jan 16

NotesSystem and DocumentExtended

Updated version of Domino Extended is now available.

Things are building. Simulating an abstract class in LotusScript started some discussion with Tim Triponcy, who combined the abstract classes with Julian’s singleton concept. The result was a System class that would not have to be initialized but could be used by anything that included the script library. I like Tim’s concept so much that I had to take it and run, with some minor changes and improvements (at lest from my perspective). I also wanted to take this same NotesSystem (new name) and port it to Java, since I have been doing most of my development in Java for Domino, using Domiclipse (awesome tool). Because Java can access the backend of Domino some of the UI methods have been commented out.  There is one other class that I created called NotesDocumentExtended (DocumentExtended in Java) to make my life easier and so I can be more lazy.

Enough said here are the class overviews

NotesSystem oveview

Private Class NotesSystem
	Public Sub New()
	Public Function hasWorkspace() As Boolean
	Public Function ThisWorkspace() As NotesUIWorkspace
	Public Function ThisDatabase() As NotesDatabase
	Public Function hasDocument() As Boolean
	Public Function ThisDocument() As NotesDocument
	Public Function hasUIDocument() As Boolean
	Public Function ThisUIDocument() As NotesUIDocument
	Public Function ThisSession() As NotesSession
	Public Function CurrentUser() As NotesName
	Public Function CurrentUserCommon() As String
	Public Function CurrentUserAbbreviated() As String
End Class

NotesDocumentExtended oveview

Public Class NotesDocumentExtended
	Public Function getFieldValues ( fieldName As String ) As Variant
	Public Function getFieldItem ( fieldName As String ) As NotesItem
	Public Sub replaceField ( fieldName As String , Var As Variant )
	Public Function getFieldText ( fieldName As String ) As String
	Public Function hasField ( fieldName As String ) As Boolean
	Public Function hasFieldText ( fieldName As String ) As Boolean
	Public Function hasDoc ( ) As Boolean
	Public Function hasDocument ( ) As Boolean
	Public Sub setDoc ( Doc As NotesDocument )
	Public Function Doc() As NotesDocument
	Public Sub setDocument ( Document As NotesDocument )
	Public Function Document As NotesDocument
End Class
Continue reading

Jan 11

Simulating abstract classes

Java allows the creation of abstract classes but currently LotusScript does not, but I have a way of simulating. There is no way of enforcing it but here is a way of implementing it.
  1. Create a new LotusScript Library
  2. Create a class as you would normally. I have created one called DaysOfTheWeek
  3. Class DaysOfTheWeek
      Public Function getWeekDay( dow As Integer ) 
        Select Case dow
          Case 1
            getWeekDay = "Sunday"
          Case 2
            getWeekDay = "Monday"
          Case 3
            getWeekDay = "Tuesday"
          Case 4
            getWeekDay = "Wednesday"
          Case 5
            getWeekDay = "Thursday"
          Case 6
            getWeekDay = "Friday"
          Case 7
            getWeekDay = "Saturday"
          Case Else
            getWeekDay = ""
        End Select
      End Function
    End Class
  4. Declare a variable the same name as the class
     Dim DaysOfTheWeek As DaysOfTheWeek
  5. Declare the ‘DaysofTheWeek’ variable in the ‘Initialize’ Subrutine
    Set DaysOfTheWeek = New DaysOfTheWeek
  6. Save the script library, I named mine “Days of the Week”
  7. Create a LotusScript Agent, don’t forget to se the agent target to none.
  8. Include the LotusScript library in the agent
    Use "Days of the Week"
  9. Just start using the class
    Sub Initialize
      Print "Today's Day of the week:" + DaysOfTheWeek.getWeekDay( Weekday( Now ) )
      Print "Day of the week1:" + DaysOfTheWeek.getWeekDay( 1 )
      Print "Day of the week2:" + DaysOfTheWeek.getWeekDay( 2 )
      Print "Day of the week3:" + DaysOfTheWeek.getWeekDay( 3 )
      Print "Day of the week4:" + DaysOfTheWeek.getWeekDay( 4 )
      Print "Day of the week5:" + DaysOfTheWeek.getWeekDay( 5 )
      Print "Day of the week6:" + DaysOfTheWeek.getWeekDay( 6 )
      Print "Day of the week7:" + DaysOfTheWeek.getWeekDay( 7 )
      Print "Day of the week8:" + DaysOfTheWeek.getWeekDay( 8 )
    End Sub
  10. Run the agent and watch the status bar.
That is it! Simple, but accomplishes the task of creating abstract class in LotusScript. Just for the record I normal don’t declare global varibles like this.