0

Following on from my earlier question(How to define a class with published method in a separate unit that is available at design-time to other units?), I am using an interposer class for TFDtable, as suggested by Remy Lebeau and overriding the DoBeforeOpen procedure in order to set the CatalogName property before passing off to the inherited method.

However, the BeforeOpen event only fires on a programmatic open of the table, apparently. For a table defined as active at design-time, this event does not fire and due to the recently introduced TFDtable bug (Delphi TFDTable open fails when indexname is set), an exception may be thrown (if indexname is set and DB name has spaces/hyphens). So, I need to identify a method I can override that would allow me to set the catalogname before the table is internally opened.

Overriding the Loaded procedure so that it sets catalogname and then the inherited logic, seems to be working, but I would appreciate some input as to the best approach.

TomB
  • 750
  • 4
  • 17

0 Answers0