Subject Re: [IBO] TIB_Connection: error msg displayed upon cancel
Author Raymond Kennington
Why have a message box with Ok/Cancel if cancelling the logon is going to bring up an
Error message?

I was so surprised that I actually was startled by the white cross on a red background:
What could be wrong?

Connected would only be attempted if I choose Ok, for then a username and a password would
have been entered and the user (the developer in the IDE in this case) would want to
attempt to set it to true.

An attempt to set Connected to True should only occur if I press Ok and no attempt should
be made to Connect if I choose to cancel the option.

Raymond Kennington

Nando Dessena wrote:
>
> Raymond,
>
> > Since it is also the same at run-time, I will have to create a work-around for this poor
> > behaviour --- unless the author would like to correct it.
>
> I doubt he would, since it is both expected and accepted behaviour.
> If there was the even remote possibility for Connected to be False after
> an assignment such as "Connected := True", without any exception raised,
> then an implicit postcondition would bee violated, and we would be
> talking about a joke. Fortunately, we are talking about a serious
> development environment such as Delphi here.
> I can see your point as an application user, but it doesn't make sense
> as a developer, since application users don't use the Object Inspector
> nor write code to set properties.
>
> > I doubt it would adhere to ISO standard 9241-11.
>
> So wouldn't my cell phone, FWIW. :-)
>
> It's not the programming tools that adhere to that standard, but the
> applications you develop with those tools. If you consider this
> (absolutely clean) behaviour poor or think it should be fixed someway,
> then I believe you're gonna have a hard time developing applications
> with Delphi. Do you plan to write something like
>
> MyConnection.Connected := True;
> // do something with the connection
>
> or
>
> try
> MyConnection.Connected := True;
> // do something with the connection
> except
> // tell the user something went wrong, or ignore the exception,
> // or do whatever you wish
> end;
>
> ?
> Ciao
> --
> ____
> _/\/ando
>
>
> ___________________________________________________________________________
> IB Objects - direct, complete, custom connectivity to Firebird or InterBase
> without the need for BDE, ODBC or any other layer.
> ___________________________________________________________________________
> http://www.ibobjects.com - your IBO community resource for Tech Info papers,
> keyword-searchable FAQ, community code contributions and more !
>
> Your use of Yahoo! Groups is subject to http://docs.yahoo.com/info/terms/