JGMS 2 Posted March 2 Integer constants as defined in "TFDPhysCommandKind" in unit 'FireDAC.Phys.Intf' in Delphi 11.3 and below, appear to be missing in Delphi 12. TFDPhysCommandKind = (skUnknown, skSelect, skSelectForLock, skSelectForUnLock, skDelete, skInsert, skMerge, skUpdate, skCreate, skAlter, skDrop, skStoredProc, skStoredProcWithCrs, skStoredProcNoCrs, skExecute, skStartTransaction, skCommit, skRollback, skSet, skSetSchema, skOther, skNotResolved); Does anybody know what has happened to them? Any idea where to find them? Thanks ahead. Share this post Link to post
Uwe Raabe 2063 Posted March 2 They have been renamed to TFDCommandKind, while TFDPhysCommandKind is a simple alias now. Share this post Link to post
JGMS 2 Posted March 3 Thank you @Uwe Raabe I preceded the respective constants in the code with 'TFDCommandKind." to overcome this problem. I am surprised that the Delphi 12 requires the user to make code adjustments due to changes in the compiler. This is so unlike Delphi! Another surpise that I face a problem due to changes in the BindNavigatorBeforeAction and BindNavigatorClick events: they fail because their parameters (Sender asTobject; Button: TNavigateButton) are no longer accepted! In Delphi 11.3 my code runs flawless! Might I ask whether you know what to do about this? May thanks, Jan Share this post Link to post
Uwe Raabe 2063 Posted March 3 24 minutes ago, JGMS said: Another surpise that I face a problem due to changes in the BindNavigatorBeforeAction and BindNavigatorClick events: they fail because their parameters (Sender asTobject; Button: TNavigateButton) are no longer accepted! Can you give a concrete (failing) example for that? Share this post Link to post
JGMS 2 Posted March 3 These are the error messages I got. In common: '...has an incompatible parameter list.... There are a number of TBindnavigators on the form connected to TStringGrids in an FMX 32 bits Windows application. The events that are connected to the BindNavigators from within the Object Inspector are defined by procedure TForm1.BindNavigatorBeforeAction(Sender: TObject; Button: TNavigateButton); and procedure TForm1.BindNavigatorClick(Sender: TObject; Button: TNavigateButton); If I'd click 'Yes' I will loose the LiveBindings connections. I don't even want to think of that! Share this post Link to post
JGMS 2 Posted March 3 When I create an FMX application with a StringGrid and a BindNavigator with an Onclick event, the latter sets TBindNavigatebutton as parameter rather than TNavigateButton. The former comes from the unit Fmx.Bind.Navigator and the latter from Data.Bind.Controls. This leaves the question: is there a way to let the compiler accept both parameters? Share this post Link to post
Uwe Raabe 2063 Posted March 3 1 hour ago, JGMS said: is there a way to let the compiler accept both parameters? Not that I am aware of. Besides that, I really question the benefits of this declaration: TBindNavigateBtn = TNavigateButton; Share this post Link to post
JGMS 2 Posted March 3 I changed the parameter TNavigateButton to TBindNavigateBtn in both events, and I added FireDac.Stan.Intf to the unit clause to have TFDCommandKind constants like "skInsert" recognised. Problems solved. Thanks for your help. Share this post Link to post