I've been working on a view that allows in view editing of one column that displays the Subject field. I added validation to the InViewEdit event to ensure that the Subject column value entered isn't blank (or empty) before the change is saved to the document. My code prompts the user to enter the missing value:
/A7C6C3694DA86F0785257586004C9F56/$File/PleaseEnterTheSubject.jpg)
After which the view displays the following error:
/BF3F03AA32F3676085257586004CB0CE/$File/ErrorValidatingColumnValue.jpg)
There is a work around on LDD that does prevent the "Error validating" message from appearing, but the column being edited loses focus. I just tested this in 8.0.2 and the client still works this way. Sigh. I guess some things never change. At least I remembered why I never bother with in view editing.
One of my clients reported the following error when composing a document:
/C5EAC2E6122C1DF6852575780045492D/$File/EmptyParenthesis.jpg)
I created the database with Designer 6.5.5 because all of the users throughout the company use Notes 6.5.5. However, there are a few users that are testing Notes 8 Standard. For some reason, the Notes Lotusscript compiler didn't like the following Lotusscript function defined in the form (Globals) event:
Function isValid () As Boolean
According to the Domino Designer Help:
You included empty parentheses in referring to a variable of type Variant or an undefined function or sub (which LotusScript interprets as a reference to an implicitly declared variable of type Variant).
This didn't make any sense to me, so I resaved the form in DD 8 and tried composing a document with the form again. This resolved the error, but left me wondering how many other forms I'd need to resave to fix this issue when my client moves to Notes 8...
Sub Initialize Dim pre As String Dim fst As String Dim mdl As String Dim lst As String Dim suf As String Dim username As String Dim username2 Dim nameStr As String pre = "" fst = "Michael" mdl = "" lst = "Sobczak" suf = "" username = Trim$(pre & " " & fst & " " & mdl & " " & lst & " " & suf) End Sub
One thing I always do before I begin updating complex code is document the flow of the code. My rudimentary way of doing this is to start with the initial subroutine and indent each subroutine that is subsequently called, like this:
Initialize()
getProfile()
calculateRate()
updateDocs()
END OF CODE
I document my findings either on a piece of paper or in Wordpad, depending on how complex the code turns out to be. (I'd record this in a Journal entry in Notes if the Lotusscript debugger didn't lock the Notes client--ugh!.)
If the code is particularly complex I'll use the Lotusscript debugger to figure out what's calling what. Essentially I'm coming up with the call stack for the code for normal code execution. I'm guessing that there must be some standard practice or way of doing this sort of documentation. I've tried to use Visio to do this in the past, but Visio seems like a lot of overhead (not to mention cost) to do what is a fairly basic task. Does anyone out there have a better or more elegent way to document subroutine calls?
I've been researching a problem that appears to be related to Windows Vista, and am looking for help/guidance from any Notes <-> Office integration experts out there in Notes community.
When I run the following code within Windows XP, the Excel spreadsheet is opened and maximized on the user's desktop. However, when I run the same code on Windows Vista, the Excel spreadsheet is opened but minimized in the Task Bar.
Const FILEPATH = "c:\Temp\Issues.xls"
Dim o As Variant
Dim oWB As Variant
Set o = CreateObject("Excel.Application")
o.EnableEvents = False
o.DisplayAlerts = False
Set oWB = o.Workbooks.Open ( FILEPATH )
o.Visible = True
I know I can use ActivateApp to resolve this, but that would require updating a lot of existing code. Is there is a setting or a preference in Windows Vista that would restore the behavior users had with Windows XP and prior?
If ( Isobject ( res ) ) Then If ( Not ( res Is Nothing ) ) Then Delete res End If End IfOf course, the obvious question is why I'm bothering to delete these objects at all, when LotusScript automatically deallocates objects for you. Well, I thought I'd be a responsible citizen and immediately clean up after myself when instantiating objects within a loop. Call it Post Traumatic Stress Disorder brought on by not calling recycle() on Domino objects instantiated within either a for or a while loop within Java code. I know the two languages are completely different and handle object deallocation differently, but I'm concerned with assuming Notes will do the right thing and having my application crash the server once its in production and being used by 2k employees on a daily basis. Also, the example code contained within "Appendix B-2: Dynamic Script Library Loading" of the Performance Considerations for Domino Applications IBM Redbook show the custom object being deleted, and I'm assuming that that's being done for a reason...
Dim session As NotesSession Dim currDb As NotesDatabase Dim qaParent As NotesDocument Dim prodParent As NotesDocument Dim qaDB As NotesDatabase Dim v As NotesView Dim i As Integer On Error Goto errorHandler Set session = New NotesSession Set currDb = session.CurrentDatabase Set qaDB = session.GetDatabase ( "QAServer/CMA", "somedb.nsf" ) Set prodDb = session.GetDatabase ( "PRODServer/CMA", "somedb.nsf" ) Set v = qaDB.GetView ( "Main" ) v.Refresh v.AutoUpdate = False Set qaParent = v.GetFirstDocument Do Until ( qaParent Is Nothing ) i = i + 1 Print "Processing doc: " & i Set prodParent = qaParent.CopyToDatabase ( prodDb ) Set qaParent = v.GetNextDocument ( qaParent ) Loop Msgbox "Processing complete" End Sub
Su | Mo | Tu | We | Th | Fr | Sa |
|---|---|---|---|---|---|---|
1 | 2 | 3 | 4 | |||
5 | 6 | 7 | 8 | 9 | 10 | 11 |
12 | 13 | 14 | 15 | 16 | 17 | 18 |
19 | 20 | 21 | 22 | 23 | 24 | 25 |
26 | 27 | 28 | 29 | 30 | ||