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:
Re: Dialogs, Buttons and 'OnUnload\QueryClose' ~Juan Zekkrosterlen 23.Aug.03 12:53 AM a Web browser Applications Development 6.0.2 CF1Windows 2000, Windows XP, Windows 98
Yes that is true and I am fully aware that you can do this and that is how all the dialog boxes I use work. Except for the re-opening of it when user validation fails. I do not want to have to close/open dialog boxes to validate because it does not look as professional.
The problem is that there is a glaring bug in the operation of these dialogs using the new buttons that are available. I would like to hear from IBM if they have any comments on why the dialog box behaves like this.
And just in response to your solution, if you use a button with the label 'Ok', set it to type 'Normal' and set it to 'Default'. Then in the 'onClick' event put your validation and end it with:
Sub OnClick(Source As Button)
If (Not ValidUserInput(workspace.CurrentDocument) Then
MsgBox "You entered some invalid info"
Exit Sub
End If
Call workspace.RefreshParentNote()
Call workspace.CurrentDocument.Close(True)
End Sub
It will work the same as the ok button but the code will trigger before the dialog closes and will not have the effects described in my previous post.
Thanks anyway for the time you spent in responding but I really want to hear from someone at IBM about why this works the way that it does, because it is a really bad feature/bug.
--
Regards,
Anthony Lee