[453] | 1 | object frmXWBOnFail: TfrmXWBOnFail
|
---|
| 2 | Left = 207
|
---|
| 3 | Top = 127
|
---|
| 4 | Width = 509
|
---|
| 5 | Height = 343
|
---|
| 6 | Caption = 'XWBOnFail - Error Handling Demo (XWB*1.1*40 SharedRPCBroker)'
|
---|
| 7 | Color = clBtnFace
|
---|
| 8 | Font.Charset = DEFAULT_CHARSET
|
---|
| 9 | Font.Color = clWindowText
|
---|
| 10 | Font.Height = -11
|
---|
| 11 | Font.Name = 'MS Sans Serif'
|
---|
| 12 | Font.Style = []
|
---|
| 13 | Menu = MainMenu1
|
---|
| 14 | OldCreateOrder = False
|
---|
| 15 | OnCreate = FormCreate
|
---|
| 16 | PixelsPerInch = 96
|
---|
| 17 | TextHeight = 13
|
---|
| 18 | object lblLogin_ErrorText: TLabel
|
---|
| 19 | Left = 24
|
---|
| 20 | Top = 40
|
---|
| 21 | Width = 75
|
---|
| 22 | Height = 13
|
---|
| 23 | Caption = 'Login_ErrorText'
|
---|
| 24 | end
|
---|
| 25 | object btnConnect: TButton
|
---|
| 26 | Left = 213
|
---|
| 27 | Top = 256
|
---|
| 28 | Width = 75
|
---|
| 29 | Height = 25
|
---|
| 30 | Caption = 'Connect'
|
---|
| 31 | TabOrder = 0
|
---|
| 32 | OnClick = btnConnectClick
|
---|
| 33 | end
|
---|
| 34 | object rgrSelectAction: TRadioGroup
|
---|
| 35 | Left = 268
|
---|
| 36 | Top = 64
|
---|
| 37 | Width = 217
|
---|
| 38 | Height = 137
|
---|
| 39 | Caption = 'Select Action'
|
---|
| 40 | ItemIndex = 1
|
---|
| 41 | Items.Strings = (
|
---|
| 42 | 'Use OnRPCBFailure property routine'
|
---|
| 43 | 'Show Message Boxes'
|
---|
| 44 | 'Capture Text Only')
|
---|
| 45 | TabOrder = 1
|
---|
| 46 | end
|
---|
| 47 | object btnExit: TButton
|
---|
| 48 | Left = 410
|
---|
| 49 | Top = 256
|
---|
| 50 | Width = 75
|
---|
| 51 | Height = 25
|
---|
| 52 | Caption = 'Exit'
|
---|
| 53 | TabOrder = 2
|
---|
| 54 | OnClick = btnExitClick
|
---|
| 55 | end
|
---|
| 56 | object Memo1: TMemo
|
---|
| 57 | Left = 16
|
---|
| 58 | Top = 64
|
---|
| 59 | Width = 217
|
---|
| 60 | Height = 169
|
---|
| 61 | Lines.Strings = (
|
---|
| 62 | 'This is an example application to illustrate '
|
---|
| 63 | 'the effects of TRPCBroker properties '
|
---|
| 64 | 'related to Error Handling.'
|
---|
| 65 | ''
|
---|
| 66 | 'The OnRPCBFailure property can be set '
|
---|
| 67 | 'to a procedure to handle errors without '
|
---|
| 68 | 'user interaction. In the sample included '
|
---|
| 69 | 'here, the error handler will save the error '
|
---|
| 70 | 'message and a date/time stamp to a file '
|
---|
| 71 | 'named "Error.Log" in the same directory '
|
---|
| 72 | 'with the application program. YOU WILL '
|
---|
| 73 | 'NOT SEE AN ERROR MESSAGE IN '
|
---|
| 74 | 'THIS CASE!'
|
---|
| 75 | ''
|
---|
| 76 | 'If OnRPCBFailure property is not '
|
---|
| 77 | 'assigned to a procedure, errors by default '
|
---|
| 78 | 'would be shown in a message box '
|
---|
| 79 | 'created by the TRPCBroker component. '
|
---|
| 80 | 'This behavior is controlled by the '
|
---|
| 81 | 'ShowErrorMsgs property, with a default '
|
---|
| 82 | 'of semShow (Show Message Boxes). '
|
---|
| 83 | ''
|
---|
| 84 | 'If the ShowErrorMsgs property is set to '
|
---|
| 85 | 'semRaise (Don'#39't Show Message Boxes), '
|
---|
| 86 | 'the error will be permitted to be handled '
|
---|
| 87 | 'by a higher part of the application. In '
|
---|
| 88 | 'most cases this will produce an error '
|
---|
| 89 | 'dialog box generated by the system in '
|
---|
| 90 | 'general.'
|
---|
| 91 | ''
|
---|
| 92 | 'If the ShowErrorMsgs property is set to '
|
---|
| 93 | 'semSet (Capture Text Only), there will be '
|
---|
| 94 | 'no error action taken except for the '
|
---|
| 95 | 'setting of error messages into the '
|
---|
| 96 | 'RPCBError and/or Login.ErrorText '
|
---|
| 97 | 'properties. In this case, the application '
|
---|
| 98 | 'MUST check these properties '
|
---|
| 99 | 'immediately after a call to the RPCBroker '
|
---|
| 100 | 'to determine whether any errors were '
|
---|
| 101 | 'encountered and to determine the action '
|
---|
| 102 | 'to be taken.'
|
---|
| 103 | ''
|
---|
| 104 | 'Select the type of behavior desired by '
|
---|
| 105 | 'clicking on one of the options to the right.'
|
---|
| 106 | ''
|
---|
| 107 | 'Then press Connect and either cancel '
|
---|
| 108 | 'during the log-in dialog or generate an '
|
---|
| 109 | 'error in some other manner. If you are '
|
---|
| 110 | 'connected, the button will change to '
|
---|
| 111 | 'Disconnect and you can click on it to '
|
---|
| 112 | 'disconnect from the server.'
|
---|
| 113 | ''
|
---|
| 114 | 'Checking the check box "Use Silent Bad '
|
---|
| 115 | 'Access/Verify" to the left will set the '
|
---|
| 116 | 'AccessVerifyCodes property to '
|
---|
| 117 | #39'monkeysee;monkeydo'#39' which will cause '
|
---|
| 118 | 'a silent login attempt and fails.'
|
---|
| 119 | '')
|
---|
| 120 | ScrollBars = ssVertical
|
---|
| 121 | TabOrder = 3
|
---|
| 122 | end
|
---|
| 123 | object edtErrorText: TEdit
|
---|
| 124 | Left = 8
|
---|
| 125 | Top = 8
|
---|
| 126 | Width = 473
|
---|
| 127 | Height = 21
|
---|
| 128 | TabOrder = 4
|
---|
| 129 | Text = 'RPCBroker_RPCBError property'
|
---|
| 130 | end
|
---|
| 131 | object edtLoginError: TEdit
|
---|
| 132 | Left = 104
|
---|
| 133 | Top = 32
|
---|
| 134 | Width = 225
|
---|
| 135 | Height = 21
|
---|
| 136 | TabOrder = 5
|
---|
| 137 | Text = 'RPCBroker_Login_ErrorText Property'
|
---|
| 138 | end
|
---|
| 139 | object cbxBadAccess: TCheckBox
|
---|
| 140 | Left = 16
|
---|
| 141 | Top = 256
|
---|
| 142 | Width = 169
|
---|
| 143 | Height = 17
|
---|
| 144 | Caption = 'Use Silent Bad Access/Verify'
|
---|
| 145 | TabOrder = 6
|
---|
| 146 | end
|
---|
| 147 | object MainMenu1: TMainMenu
|
---|
| 148 | Left = 112
|
---|
| 149 | Top = 8
|
---|
| 150 | object File1: TMenuItem
|
---|
| 151 | Caption = '&File'
|
---|
| 152 | object Exit1: TMenuItem
|
---|
| 153 | Caption = 'E&xit'
|
---|
| 154 | OnClick = Exit1Click
|
---|
| 155 | end
|
---|
| 156 | end
|
---|
| 157 | object Help1: TMenuItem
|
---|
| 158 | Caption = '&Help'
|
---|
| 159 | object About1: TMenuItem
|
---|
| 160 | Caption = '&About'
|
---|
| 161 | OnClick = About1Click
|
---|
| 162 | end
|
---|
| 163 | end
|
---|
| 164 | end
|
---|
| 165 | object RPCB: TSharedRPCBroker
|
---|
| 166 | ClearParameters = True
|
---|
| 167 | ClearResults = True
|
---|
| 168 | ListenerPort = 0
|
---|
| 169 | RpcVersion = '0'
|
---|
| 170 | LogIn.Mode = lmAVCodes
|
---|
| 171 | LogIn.PromptDivision = False
|
---|
| 172 | OldConnectionOnly = False
|
---|
| 173 | AllowShared = True
|
---|
| 174 | RPCTimeLimit = 30
|
---|
| 175 | Left = 8
|
---|
| 176 | Top = 224
|
---|
| 177 | end
|
---|
| 178 | end
|
---|