Board index » delphi » Delphi 2.0 BUG ALERT !!!!!

Delphi 2.0 BUG ALERT !!!!!

Quote
John stathakis wrote:

> Hello Everyone,

> Please could someone confirm this bug I discovered:

> When I open a table or query from within a function, the SQL hourglass
> does not go away. The problem is not there when I open the table/query
> from within a procedure. (strange, I know - took me 2 hours to whittle
> down my feature full form to this point).

> Here is the source (the rest is default):

> unit MainSwitchboard;

> interface

> uses
>   Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
> Dialogs,
>   StdCtrls, DB, Menus, ExtCtrls, Buttons, DBTables, Grids, DBGrids;

> type
>   TFormMainSwitchboard = class(TForm)
>     BitBtn1: TBitBtn;
>     Table1: TTable;
>     Database1: TDatabase;
>     BitBtn2: TBitBtn;
>     procedure BitBtn1Click(Sender: TObject);
>     procedure BitBtn2Click(Sender: TObject);
>   private
>   public
>     function Func1: string;
>   end;

> var
>   FormMainSwitchboard: TFormMainSwitchboard;

> implementation

> uses LoginDialog;

> {$R *.DFM}

> procedure TFormMainSwitchboard.BitBtn2Click(Sender: TObject);
> begin
>   Database1.Open;
> end;

> procedure TFormMainSwitchboard.BitBtn1Click(Sender: TObject);
> begin
>   If func1 = 'Testing' then ShowMessage('Login OK');
> end;

> function TFormMainSwitchboard.func1: string;
> begin
>   Table1.Open;
>   Result := 'Testing';
> end;

> end.

The plot thickens:

It appears that any procedure which passes back a value, WHICH IS USED,
causes the same error.

Here is the source: (p.s. am I the only one experiencing this, am I
doing something wrong ? mmmm)

unit MainSwitchboard;

interface

uses
  Windows, Messages, SysUtils, Classes, Graphics, Controls, Forms,
Dialogs,
  StdCtrls, DB, Menus, ExtCtrls, Buttons, DBTables, Grids, DBGrids;

type
  TFormMainSwitchboard = class(TForm)
    BitBtn1: TBitBtn;
    Table1: TTable;
    Database1: TDatabase;
    BitBtn2: TBitBtn;
    procedure BitBtn1Click(Sender: TObject);
    procedure BitBtn2Click(Sender: TObject);
  private
  public
    procedure func1(var retval: string);
  end;

var
  FormMainSwitchboard: TFormMainSwitchboard;

implementation

uses LoginDialog;

{$R *.DFM}

procedure TFormMainSwitchboard.BitBtn2Click(Sender: TObject);
begin
  Database1.Open;
end;

procedure TFormMainSwitchboard.BitBtn1Click(Sender: TObject);
var
  rv: string;
begin
  func1(rv);
  {Uncomment the following line to get an unending SQL Hourglass}
  {ShowMessage(rv);}
end;

procedure TFormMainSwitchboard.func1(var retval: string);
begin
  Table1.Open;
  retval := 'A';
end;

end.

 

Re:Delphi 2.0 BUG ALERT !!!!!


I wrote some code for a window where some database processing is
getting done.  When the user closes the window during processing, I
close all my datasets and release the window on close.  Sometimes,
when it goes back to the main window, the SQL hourglass sticks.
Everything still works, it's just that the hourglass didn't reset
itself.  And it only appears over the speed buttons, not the menu bar,
title bar, or status bar.  My interface is nearly identical to the
mastapp demo.

Re:Delphi 2.0 BUG ALERT !!!!!


Kyle A. Miller (kmil...@why.net) wrote:
: I wrote some code for a window where some database processing is
: getting done.  When the user closes the window during processing, I
: close all my datasets and release the window on close.  Sometimes,
: when it goes back to the main window, the SQL hourglass sticks.
: Everything still works, it's just that the hourglass didn't reset
: itself.  And it only appears over the speed buttons, not the menu bar,
: title bar, or status bar.  My interface is nearly identical to the
: mastapp demo.

I have exactly the same problem! With Delphi1.1 my app was doing fine,
but with 2.0 it frequently gets stuck with these SQL hourglasses.

                                            Andy

Other Threads