Subject Re: [IBO] "2-nd time thru" problems
Author Geoff Worboys
> I read it twice since I couldn't believe it; are you saying
> that an event handler assignment to a column's event does
> not survive a record change?

Perhaps I put it badly (Jason was shorter and more to the point I
think).

What I meant was...

In a bufferred dataset (TIB_Query) there are actually two independant
TIB_Row instances (actually there can be more than that but lets keep
this simple).

* Fields - represents the row that is the current row of the dataset,
the one whose columns appear in your TIB_Edit controls etc. This
column has its own set of column instances (referenced as FieldByName
or Fields[] or Fields.Columns[]). These are the column instances that
you usually interact with. When you scroll through the dataset, these
column instances will point to the new row - so event handler
assignments will survive.

* BufferFields - is a totally independant TIB_Row instance, that can
be cycled through without changing the what the Fields row thinks is
the current row. TIB_Grid and various other processes use this to
scan through the buffered dataset without impacting the users current
row.

Because BufferFields is a separate TIB_Row and has its own column
instances, you must separately assign any event handlers to the
BufferFields columns - if you want those handlers used in things like
TIB_Grid.


I hope this clarifies.

Geoff Worboys
Telesis Computing