- This topic has 2 replies, 2 voices, and was last updated 4 years, 9 months ago by .
Viewing 2 reply threads
Viewing 2 reply threads
- You must be logged in to reply to this topic.
hi,
run code, have a error.
procedure TForm3.Button1Click(Sender: TObject); begin FBindings.UpdateEvent.Activate(False); FBindings.Clear; FBindings.Bind(DisplayDataSet, 'f1', ListView1, '#Text1'); // error. FBindings.Bind(DisplayDataSet, 'f2', ListView1, '#Text2'); FBindings.Bind(DisplaydataSet, '@', ListView1, '@', [mwboTwoWay]); FBindings.Update; FBindings.UpdateEvent.Activate(True); end;
best regards
Tom YU.
procedure TForm3.Button1Click(Sender: TObject); begin FBindings := TkbmMWBindings.Create; FBindings.Bind(DisplayDataSet, 'f1', ListView1, '#Text1'); // error. FBindings.Bind(DisplayDataSet, 'f2', ListView1, '#Text2'); FBindings.Bind(DisplaydataSet, '@', ListView1, '@', [mwboTwoWay]); FBindings.UpdateEvent.Activate(False); FBindings.Clear; //An error occurred end;
Writing the code like this reproduced this error.
Hi,
You were usually not supposed to deactivate the update event. Doing that release some internal resources which should only be released when the smart binding instance dies.
However I can understand situations where one perhaps would like to pause the update event, why I have introduced a fix for next release.
/Kim