Domino 9 und frühere Versionen > ND6: Entwicklung
NotesUIDocument: Save Cancelled
jo@chim:
Ich habe im Querysave einer Maske eine Eingabevalidierung per selbstprogrammierter Funktion "proofInput(Source) as Boolean":
Sub Querysave(Source As Notesuidocument, Continue As Variant)
On Error Resume Next
Source.Refresh
If proofInput(Source) = False Then
continue = False
Exit Sub
End If
'... weiterer Code ...
End Sub
Die Fehlermeldung "NotesUIDocument: Save Cancelled" wird aber (entgegen der Tipps zum Thema auch hier im Forum) durch die Fehlerroutine nicht abgefangen.
Any Hints?
P.S.: Notes Version 6.5.5
Glombi:
Ich sehe hier aber kein korrektes Error Handling. Resume Next ist das jedenfalls nicht.
In den Tipps steht bestimmt sowas:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
On Error Goto Error_Refresh
Source.Refresh
If proofInput(Source) = False Then
continue = False
Exit Sub
End If
'... weiterer Code ...
Ende:
End Sub
Error_Refresh:
continue = False
Resume Ende
Andreas
jo@chim:
Negativ Sir. Ich hab das jetzt so eingebunden:
--- Code: ---Sub Querysave(Source As Notesuidocument, Continue As Variant)
On Error Goto Error_Refresh
Source.Refresh
If proofInput(Source) = False Then
continue = False
Exit Sub
End If
Exit Sub
Ende:
Error_Refresh:
continue = False
Resume Ende
End Sub
--- Ende Code ---
Fehlermeldung tritt nach wie vor auf.
Glombi:
So:
Sub Querysave(Source As Notesuidocument, Continue As Variant)
On Error Goto Error_Refresh
Source.Refresh
If proofInput(Source) = False Then
continue = False
Exit Sub
End If
'... weiterer Code ...
Ende:
Exit Sub
Error_Refresh:
continue = False
Resume Ende
End Sub
Wenn es immer noch auftritt, liegt es evtl. am
proofInput(Source) =
Was macht die Funktion?
Andreas
Axel:
Ich habe die Sache bei mir mal nachgestellt, allerdings ist meine proofInput - Funktion nur eine Rumpf-Funktion und liefert immer false zurück.
Bei mir kommt keine Fehlermeldung. Das muss irgendwo anders herkommen. Evt, wie Andreas schon sagte in der proofInput-Funktion, oder von irgendwelchen Validierungsformeln o.ä. in der Maske
Axel
Navigation
[0] Themen-Index
[#] Nächste Seite
Zur normalen Ansicht wechseln