Icon View Thread

The following is the text of the current message along with any replies.
Messages 1 to 4 of 4 total
Thread EWB Bug : reassign datasets
Wed, Nov 3 2021 6:49 PMPermanent Link

erickengelke

Avatar

Several times now I've encounter a bug where  had a TGrid with an assigned TDataSet.  I switch to a different form, add a new TDataSet, and suddenly the old TGrid on the old form is updated to use my new TDataSet for no apparent reason.

In all three situations, I wasn't editing the Grid when I switched forms.  I don't know why it does this.
 

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Mon, Nov 29 2021 6:31 AMPermanent Link

Tim Young [Elevate Software]

Elevate Software, Inc.

Avatar

Email timyoung@elevatesoft.com

Erick,

<< Several times now I've encounter a bug where  had a TGrid with an assigned TDataSet.  I switch to a different form, add a new TDataSet, and suddenly the old TGrid on the old form is updated to use my new TDataSet for no apparent reason. >>

Do these forms/datasets share the same name ?

The only time that EWB performs any type of "fixup" on these types of references is when forms/databases/request handlers are loaded, and the fixups are performed according to the name of the owner form/database/request combined with the name of the component being referenced.

Tim Young
Elevate Software
www.elevatesoft.com
Sun, Jan 16 2022 7:12 PMPermanent Link

erickengelke

Avatar

Tim Young [Elevate Software] wrote:

Erick,

<< Several times now I've encounter a bug where  had a TGrid with an assigned TDataSet.  I switch to a different form, add a new TDataSet, and suddenly the old TGrid on the old form is updated to use my new TDataSet for no apparent reason. >>

>Do these forms/datasets share the same name ?

>The only time that EWB performs any type of "fixup" on these types of references is
>when forms/databases/request handlers are loaded, and the fixups are performed according to the
>name of the owner form/database/request combined with the name of the component being referenced.

No, they don't at the current time.  But obviously they were all named TForm1 or TDialog1 when they were created.
Maybe to avoid confusion, EWB should name forms TForm2, TForm3, etc at create time or prompt the user for a form name - because yes that is a different annoyance when you run your project and multiple TForm1's or TDlalog1s exist.

Something seems to happen at compile time that causes the change.  You compile, then saddlery the datasets are wrong or datafyield.

Erick
EWB Programming Books and Component Library
http://www.erickengelke.com
Sun, Jan 16 2022 11:20 PMPermanent Link

erickengelke

Avatar


It happened again.  This time I was paying attention.

I had a Form1.  I created a new form, which it defaults to Form1.  Then compiled, realized my mistake of having two form1s, and renamed the 2nd Form1 to FormNewUesr.  But Form2 had a TGrid which referred to the Dataset on Form1, now switched to FormNewUser, even though the Dataset was on real Form1..  
EWB Programming Books and Component Library
http://www.erickengelke.com
Image