Okay, works fine that way!
The help information should be a little bit more helpfull.
Have a look to my (your customers) view on it.
Description
Execute method of TUniConnectDialog says:
"Displays the connect dialog and calls the connection's Connect method when user clicks the Connect button"
=> dialog calls UniConnection.Connect()
But which UniConnection object?
Description
Connection property of TUniConnectDialog says:
"Points to the associated TUniConnection object. "
"Remarks
The
Connection property points to the associated TUniConnection object. This property is read only. "
=> If there is a read only property to a TUniConnection object and there is no method to set it. (Let me think...) The dialog must create it as a sub object, cause it will call it's UniConnection.Connect() method! After the execution every one can get the UniConnection object from the dialogs property.
That leads to the wrong direction. The right solution is:
First set TUniConnection.ConnectDialog property to a TUniConnectDialog object. If TUniConnection.Connected property is false, call the
Execute method of the TUniConnectDialog. A click on the connect button will call the UniConnection.Connect() method.
(Strange to me, that you introduce dialog object to connetion object. Than dialog object automaticly knows the connection object and can call its methodes.)
Thanks for quick solution.