Domino 9 und frühere Versionen > ND7: Entwicklung
Frage zum Querydocumentdelte
ascabg:
Hallo,
--- Zitat ---Klar, das ergibt einen Sinn aber wo kommt das Command her?
--- Ende Zitat ---
Welches Command?
Andreas
Peter Klett:
Du darfst nicht nach Source suchen. Source ist doch nur ein Name einer Variablen (oder einer Instanz, oder wie immer das ganz genau heißt, möchte mich nicht mit OOP-Theoretikern streiten). Entscheidend ist
Sub Querydocumentdelete(Source As Notesuidatabase, Continue As Variant)
Wenn Du in der Klasse Notesuidatabase nachschaust, findest Du Documents, und das ist eine NotesDocumentCollection.
Axel:
Documents ist ein Property der Klasse NotesUIDatabase
Auszug aus der Hilfe:
--- Zitat ---Documents property
Read-only. All the documents that the current NotesUIDatabase event is working on.
Defined in
NotesUIDatabase
Data type
NotesDocumentCollection
Syntax
To get: Set notesDocumentCollection = notesUIDatabase.Documents
Usage
If the collection is empty, Documents.Count is 0.
--- Ende Zitat ---
Und es gibt auch Beispiele dazu (darunter auch eins für das Event QueryDocumentDelete):
--- Code: ---Examples: NotesUIDatabase class
This example tracks the number of document deletions that occur while a database is open.
(Declarations)
Dim deleteCount As IntegerSub Postopen(Source As Notesuidatabase)
deleteCount = 0
End Sub
Sub Querydocumentdelete(Source As Notesuidatabase, _
Continue As Variant)
If Continue Then
deleteCount = deleteCount + Source.Documents.Count
End If
End Sub
Sub Querydocumentundelete(Source As Notesuidatabase, _
Continue As Variant)
If Continue Then
deleteCount = deleteCount - Source.Documents.Count
End If
End Sub
Sub Postdocumentdelete(Source As Notesuidatabase)
Messagebox Source.Documents.Count _
& " deleted or marked for deletion"
End Sub
Sub Queryclose(Source As Notesuidatabase, Continue As Variant)
Messagebox deleteCount & " documents deleted",, _
"Net deletions"
End Sub
--- Ende Code ---
Axel
Navigation
[0] Themen-Index
[*] Vorherige Sete
Zur normalen Ansicht wechseln