This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal


Jul 8, 2013, 10:37 AM
5 Posts

NotesViewEntryCollection.clone() fails

  • Category: Domino Designer
  • Platform: All Platforms
  • Release: 9.0
  • Role: Developer
  • Tags: clone
  • Replies: 1

A fundamental method of NotesViewEntryCollection appears to fail.

 

It's the clone method. I intended to use this as a part of a strategy to transform a procedurally-oriented dev environment into an OO environment.

 

 

Option Declare

 
Const VIEW_NAME = "(Lookup - Status)"
Sub Initialize
 
Dim session As New NotesSession
Dim thisDb As NotesDatabase
 
Set thisDb = session.Currentdatabase
 
Dim view As NotesView
Set view = thisDb.Getview(VIEW_NAME)
 
Dim nvec0 As NotesViewEntryCollection
dim nvec1 As NotesViewEntryCollection
 
Set nvec0 = view.allEntries()
 
MsgBox "nvec0 has " & nvec0.Count & " entries"
MsgBox "UNID of first entry in nvec0: " & nvec0.GetFirstEntry().Universalid
 
Set nvec1 = nvec0.clone()
 
MsgBox "nvec1 has " & nvec1.Count & " entries"

'// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

'// This fails as the getFirstEntry method returns Nothing

'// - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

MsgBox "UNID of first entry in nvec1: " & nvec1.GetFirstEntry().Universalid
 
End Sub

 

Anyone else seen this/have a workaround?

Jul 8, 2013, 12:10 PM
5 Posts
More info

The merge() method of NotesViewEntryCollection works mostly correctly. SO you can get a distinct NotesViewEntryCollection object by creating an empty NotesViewEntryCollection and merging another NotesViewEntryCollection with it. However, the sort order of the destination NotesViewCollection seems to be lost, so it is a partial solution.


This forum is closed to new posts and responses. Individual names altered for privacy purposes. The information contained in this website is provided for informational purposes only and should not be construed as a forum for customer support requests. Any customer support requests should be directed to the official HCL customer support channels below:

HCL Software Customer Support Portal for U.S. Federal Government clients
HCL Software Customer Support Portal