Stack LotusScript class

A useful class for you to use at your own risk. An implementation of a last-in-first-out data structure. Can be used like: Dim stack As New Stack() Call stack.push(”Domino”) Call stack.push(”Notes”) Call stack.push(”R7”) Print ”Stack is: ” & stack.toString() Print ”First: ” & stack.pop() Print ”Second: ” & stack.pop() Print ”Third: ” & stack.pop() ‘ […]

XML Parser Performance in LotusScript

I am not Microsoft’s biggest fan, since I was a Macintosh fanatic in the old days, but had to convert into the Wintel platform for about 10 years ago. But I have to admit though, when comparing Microsoft’s XML parser with the ones that are built into Notes/Domino, that their products sometimes are great! When […]

Manually serializing NotesDOMNodes

In my earlier post today, I described a problem I have, where I wanted to get the XML string of a DOM tree. I’ve started writing my own routine, this is what I have right now. It’s far from complete, since it can not handle namespaces, CDATA etc. yet: This is a new version that […]

Serialize a DOM tree in LotusScript?

I have a problem, that nor I nor any of my colleagues can’t solve easily. I have several classes that are passing objects/variables between them. On of them is handling Web Service request, and parsing the responses to a NotesDOMDocumentNode via the NotesDOMParser. The NotesDOMDocumentNode is passed returned, and are used in several places to […]

Getting the root element node in XML using LotusScript

So I don’t forget the next time I want to do this, and trust me, I got a short memory! Dim xml As String Dim rootElementNode As NotesDOMElementNode xml = ”YOUR XML HERE” Set rootElementNode = parseXML(xml)._ getElementsByTagName(”THE ROOTNODE”).getItem(1) Public Function parseXML(xml As String) _ As NotesDOMDocumentNode ‘ Parses the specified xml. On Error Goto […]

Sending HTML mails via LotusScript

To send HTML mails in R6, you have to use the setContentFromText method in the NotesMIMEEntity class. To add inline images, use the setContentFromBytes method in the same class, like this: Dim session as New NotesSession() session.convertMIME = False ‘ Do not convert to rich text Dim currentDb As NotesDatabase Set currentDb = session.currentDatabase Dim […]

WinHTTPRequest COM object options constants

I have tried to search for the literal values of some of the options to WinHTTP that handles SSL server certificates errors. In my case I have a development server that has a certificate with the wrong name in it, and I want to ignore the usual ”The host name in the certificate is invalid or does not match” error. At last, I find the values to use!

Vector class in Lotus Script

Here is my Vector class, that makes handling of arrays easier. You also have to use the Enumeration and VectorEnumeration classes that are attached. Use it like this: Dim v As New Vector() Call v.addElement(”Domino”) Call v.addElement(”Notes”) Call v.addElement(”R5”) Print ”Elements are: ” & v.toString() Results in the text ”Elements are: Domino, Notes, R5” You […]

Creating Custom Classes in LotusScript, part 1

The LotusScript language in Domino is very powerful once you find out that you can create custom classes with it. I´m going to write some articles about creating great helper classes, and start off with the basics of creating user classes. I am NOT going to explain why object oriented programming is better than procedure […]