Board index » delphi » feature must be in IBX 4.6

feature must be in IBX 4.6

Hi,

Implementing master-detail relationship
often encounter a problem when detail dataset
needs a 2-3 seconds (or even more) to update
its data. So, its impossible to quick scroll
through master table using keyboard, because
for every record change in master table
detail table will be reopened.

The default behavior in such cases is to
implement a delay between cursor position
changing in master table and detail table
reopening.

This is standart behavior for Winodws menus
and standart TreeView component has property
DelayInterval (or something like this).

So, my proposal is to add such property
in to TIBCustomDataSet. By default it should be set
to 0, so default behavior will not change.
But if you set it to value greater then zero
it will open timer and reopen dataset only
after specified amount of time is elapsed.

With best regards,

Andrei Kireev

 

Re:feature must be in IBX 4.6


I agree (may be not must, but advisable).

Re:feature must be in IBX 4.6


Quote
Andrei Kireev wrote:

> So, my proposal is to add such property
> in to TIBCustomDataSet. By default it should be set
> to 0, so default behavior will not change.

        I haven't researched this very far, but what would make more sense to
me would be to created a TDatasource subclass with the delay in it.
That way, it would work with *every* TDataset subclass which has a
master-detail link rather than having to implement it in every single
instance.  I think this should be possible, but I haven't checked to see
if the required methods are virtual.

        Plus, you remove the necessity to use a timer in TIBCustomDataset,
which would not benefit non-interactive apps.

        IMHO,

        -Craig

--
Craig Stuntz (TeamB)       Vertex Systems Corporation
Senior Developer           http://www.vertexsoftware.com

Delphi/InterBase weblog:   http://delphi.weblogs.com

Re:feature must be in IBX 4.6


Craig Stuntz (TeamB) <cstuntz@no_spam.vertexsoftware.com> wrote in message
news:3A9E6638.BFF09A00@no_spam.vertexsoftware.com...

Quote

> Andrei Kireev wrote:

> > So, my proposal is to add such property
> > in to TIBCustomDataSet. By default it should be set
> > to 0, so default behavior will not change.

> I haven't researched this very far, but what would make more sense to
> me would be to created a TDatasource subclass with the delay in it.
> That way, it would work with *every* TDataset subclass which has a
> master-detail link rather than having to implement it in every single

Yes. But it will require additional component. I don't think that
Borland will modify standart TDataSource.

Quote
> instance.  I think this should be possible, but I haven't checked to see
> if the required methods are virtual.

> Plus, you remove the necessity to use a timer in TIBCustomDataset,
> which would not benefit non-interactive apps.

There is no need to create timer if change interval is set to 0.
So, it will no hurt non-interactive apps.
Quote

> IMHO,

> -Craig

> --
> Craig Stuntz (TeamB)    Vertex Systems Corporation
> Senior Developer    http://www.vertexsoftware.com

> Delphi/InterBase weblog:   http://delphi.weblogs.com

Re:feature must be in IBX 4.6


Quote
"Craig Stuntz (TeamB)" wrote:

> Andrei Kireev wrote:

> > So, my proposal is to add such property
> > in to TIBCustomDataSet. By default it should be set
> > to 0, so default behavior will not change.

>         I haven't researched this very far, but what would make more sense to
> me would be to created a TDatasource subclass with the delay in it.
> That way, it would work with *every* TDataset subclass which has a
> master-detail link rather than having to implement it in every single
> instance.  I think this should be possible, but I haven't checked to see
> if the required methods are virtual.

>         Plus, you remove the necessity to use a timer in TIBCustomDataset,
> which would not benefit non-interactive apps.

And actually be bad for things like ISAPI Dlls.

Quote
>         IMHO,

>         -Craig

> --
> Craig Stuntz (TeamB)       Vertex Systems Corporation
> Senior Developer           http://www.vertexsoftware.com

> Delphi/InterBase weblog:   http://delphi.weblogs.com

--
Jeff Overcash (TeamB)
      (Please do not email me directly unless  asked. Thank You)
The correct way to punctuate a sentence that starts: "Of course it is
none of my business but ~" is to place a period after the word "but".
Don't use excessive force in supplying such a moron with a period.
Cutting his throat is only a momentary pleasure and is bound to get
you talked about.   (RAH)

Re:feature must be in IBX 4.6


Quote
"Jeff Overcash (TeamB)" wrote:

> "Craig Stuntz (TeamB)" wrote:

> >         Plus, you remove the necessity to use a timer in TIBCustomDataset,
> > which would not benefit non-interactive apps.

> And actually be bad for things like ISAPI Dlls.

        Right.  Unfortunately, the guy who wrote TDataSource doesn't seem to
have heard of virtual methods.  :)  I'm going to pursue this a little
further, because it really does seem to me to be the best way to solve
this issue.

        -Craig

--
Craig Stuntz (TeamB)       Vertex Systems Corporation
Senior Developer           http://www.vertexsoftware.com

Delphi/InterBase weblog:   http://delphi.weblogs.com

Re:feature must be in IBX 4.6


Quote
> > > So, my proposal is to add such property
> > > in to TIBCustomDataSet. By default it should be set
> > > to 0, so default behavior will not change.

> >         I haven't researched this very far, but what would make more
sense to
> > me would be to created a TDatasource subclass with the delay in it.
> > That way, it would work with *every* TDataset subclass which has a
> > master-detail link rather than having to implement it in every single
> > instance.  I think this should be possible, but I haven't checked to see
> > if the required methods are virtual.

> >         Plus, you remove the necessity to use a timer in
TIBCustomDataset,
> > which would not benefit non-interactive apps.

> And actually be bad for things like ISAPI Dlls.

We implement this in all of our systems by hand coding the sync.  I think
the dataseourse is the correct conveyor of the delay, but I think it should
be a new subclassed datasource (TDelayDatasource).  Reason being currently a
lot of people rely on the sync being correct  e.g.

master.next
while not detail.eof do

or whatever.  So to intro it at the datasource would lead to confusion to
some, whereas as a new component, current newbie users would not stumble
into problems.

The TdelayDatasource could introduce an event called OnDelay which would
allow programmers to change the UI to show the out of date nature of the
detail.

One other advantage is that as a Tdatasource, you will make it available to
all back ends.

Cheers,

JAC.

Other Threads