Domino 9 und frühere Versionen > ND6: Entwicklung

Messagebox klappt nicht (Lotus Script)

(1/1)

Alexis:
Hallo Forum,

ich bin etwas ratlos, warum wird die Messagebox nicht so wie gewünscht öffnet. Sie kommt nur mit dem Button OK?

Hier der code:

In View Declarations:
%INCLUDE "lsconst.lss"

Als Button in der View:
Sub Click(Source As Button)
   Dim session As New NotesSession
   Dim workspace As New NotesUIWorkspace
   Dim dbthis As NotesDatabase
   Dim dc As NotesDocumentCollection
   Dim datadoc As NotesDocument
   Dim item As NotesItem
   
   Set dbthis = session.CurrentDatabase
   Set dc = dbthis.UnprocessedDocuments
   
   Dim boxType As Long, answer As Integer
   boxType& = MB_YESNO + MB_ICONQUESTIO
   answer% = Messagebox ( "mit heutigem Datum"  , boxType& , "Bitte auswählen!" )
   Messagebox answer%
   
   If dc.Count > 0 Then
      Set datadoc = dc.getFirstDocument
      While Not datadoc Is Nothing
         Set notesDateTime = New NotesDateTime( "Today" )
         Set item = datadoc.ReplaceItemValue( "Datum", notesDateTime )
         Set item = datadoc.ReplaceItemValue( "Gültigkeit", "freigegeben" )
         Call datadoc.Save( True, True )
         Set datadoc = dc.GetNextDocument(datadoc)         
      Wend
   End If
   Call workspace.ViewRefresh
End Sub

klaussal:
Aus der Hilfe:

' Display the message "Do you want to continue?"
' in a message box labeled "Continue?" and containing
' Yes and No buttons. Assign the return value from
' the MessageBox function to the variable answer.
%Include "lsconst.lss"
Dim boxType As Long, answer As Integer
boxType& = MB_YESNO + MB_ICONQUESTION
answer% = MessageBox("Do you want to continue?", boxType&, _
  "Continue?")

Sieht etwas anders aus ....

Semeaphoros:
Als allererstes würde ich mal

Option Declare

unter den Optionen angeben. Der Rest ergibt sich dann wohl von selber

Alexis:
merci, es klappt :-*

Navigation

[0] Themen-Index

Zur normalen Ansicht wechseln