On Sat, 7 May 2005, Luiz AmÃrico wrote:
> take a look at TDatasource.DistributeEvent implementation (datasource.inc):
>
> With FDatalinks do
> begin
> For I:=0 to Count-1 do
> With TDatalink(Items[i]) do
> If Not VisualControl Then
> DataEvent(Event,Info);
> For I:=0 to Count-1 do
> With TDatalink(Items[i]) do
> If VisualControl Then
> DataEvent(Event,Info);
> end;
>
> Am I missimg something or the check to VisualControl doesnt make sense?
> As far as i can see the code below has the same effect
>
> With FDatalinks do
> begin
> For I:=0 to Count-1 do
> With TDatalink(Items[i]) do
> DataEvent(Event,Info);
> end;
No. First non visual components (such as detail datasets, lookup datasets)
must get their event, and only then visual controls get an event.
The double loop is intentional.
Michael.
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel