Libraria, part 4
identicon
webmaster@cfcc0ed1
DISCUSSION OF ORIGIN

Administrator

identicon

See their activity.

webmaster@cfcc0ed1 Sunday 18th February 2018, 15:59

Libraria, part 4

Part 4 of our database tutorial is online:
Libraria - part 4

DISCUSSION OF ORIGIN
identicon
Bill Delphi

Administrator

identicon

See their activity.

Bill Delphi Sunday 18th February 2018, 16:02

In the steps for the source code, step 1 and step 2 give exactly the same lines of code: Grid1.Enabled := False; and so on...
Why not replace this lines of code with a procedure? The same for steps 3 and 4.
identicon
webmaster@cfcc0ed1

Administrator

identicon

See their activity.

webmaster@cfcc0ed1 Sunday 18th February 2018, 16:30

In the Object Inspector, next to the event BeforeEdit, you could replace cdsBooksBeforeEdit with cdsBooksBeforeEditInsert. This also changes the name of the event handler in the source code.

Also in the Object Inspector, delete the text next to BeforeInsert, click on the downward pointing arrow and select cdsBooksBeforeEditInsert. Now the two events will fire the same event handler.

But I advise against this, mainly because I want to modify the code later on in part 5 of the tutorial.
The same goes for the two cdsAfter... event handlers.
Suggested Topics View / Reply Forum
webmaster@cfcc0ed1 started Emoticons (smilies) 1.7K / 0 General
webmaster@cfcc0ed1 started C++ Builder Tutorials 1.6K / 0 News
webmaster@cfcc0ed1 started About our Crash Course Delphi 3.2K / 2 CrashCourse
webmaster@cfcc0ed1 started Database Tutorials 1.7K / 0 News