I like to code outside the lotus script libraries for various reasons, then import the code into the script library, replacing what was already there.
This worked perfectly in R5. In R6, however, the import function often omits a line of code. The missing line is usually close to the lines that had changed between the imported text and the existing code in the library. I have to then close and reopen the database, then import the text file again. This behaviour happens frequently, and seems to have to do with my leaving the database open (in designer) between library imports.
Specific Example:
This excerpt is a member subroutine of one of my classes.
Source file contains:
If childVersion.sEdition_no > parentVersion.sEdition_no Then
' Upgrade the parent's structure Edition.
parentVersion.sEdition_no = childVersion.sEdition_no
' Add a comment explaining where the upgrade came from. [11/6/2002 8:44PM]
parentVersion.comment = "Structure upgraded due to subcomponent " & E.wpName
parentVersion.vDate = Today
Call parentVersion.setSource( E.parent.structure )
Call E.parent.structure.save( True, False, True )
Elseif Left( E.documentID, 2 ) = "C*" And Not Left( E.parent.documentID, 2 ) = "C*" And Not E.parent.structure.comment(0) Like "Structure upgraded*" ) Then
' If the child is custom and the parent is not custom, and the parent has not already been marked as having a custom element,
' The child is custom content, but the parent is not. Upgrade the parent's structure edition. [06/12/2003 12:48PM]
' Upgrade the parent's structure Edition.
parentVersion.sEdition_no = "" & ( cint( parentVersion.sEdition_no ) + 1 )
parentVersion.comment = "Structure upgraded due to subcomponent " & E.wpName
parentVersion.vDate = Today
Call parentVersion.setSource( E.parent.structure )
Call E.parent.structure.save( True, False, True )
End If
After importing, script library ended up with:
If childVersion.sEdition_no > parentVersion.sEdition_no Then
' Upgrade the parent's structure Edition.
parentVersion.sEdition_no = childVersion.sEdition_no
' Add a comment explaining where the upgrade came from. [11/6/2002 8:44PM]
parentVersion.comment = "Structure upgraded due to subcomponent " & E.wpName
parentVersion.vDate = Today
Call parentVersion.setSource( E.parent.structure )
Call E.parent.structure.save( True, False, True )
' If the child is custom and the parent is not custom, and the parent has not already been marked as having a custom element,
' The child is custom content, but the parent is not. Upgrade the parent's structure edition. [06/12/2003 12:48PM]
' Upgrade the parent's structure Edition.
parentVersion.sEdition_no = "" & ( Cint( parentVersion.sEdition_no ) + 1 )
parentVersion.comment = "Structure upgraded due to subcomponent " & E.wpName
parentVersion.vDate = Today
Call parentVersion.setSource( E.parent.structure )
Call E.parent.structure.save( True, False, True )
End If
The next time I imported, the line was there, but the matching ‘End If’ was gone, causing a compile error.