How to edit a TActionlist in a DBF Database???[SOLVED] lazarus / 16-Databases ---------------------------------------------------------------------- Robert W.B. · 2013-10-07 11:20 I have done DBF database, but how can I create a TActionlist to the DBF Database??? ---------------------------------------------------------------------- wp · 2013-10-07 12:02 TActionList has nothing to do with any database. I did not find an article on its usage in Lazarus, but I know this article on Delphi (http://www.blong.com/Articles/Actions/Actions.htm) is very instructive. ---------------------------------------------------------------------- Edson · 2013-10-07 13:24 You probably refer to associate a "TActionList" to a Database component. I haven't used, but there is some Standar Actions that can control a Database component. It's suposed to only add this Standar Actions to your ActionList, and then, they will control your Database component. ---------------------------------------------------------------------- Robert W.B. · 2013-10-07 13:57 Thanks for the answers. I try to understand the address database demo, how to build the Actionlist ANew, AOpen,AClose etc. How can i build this in the actionlist? Best regards ---------------------------------------------------------------------- howardpc · 2013-10-07 15:06 Quote from: robbanux on October 07, 2013, 03:57:29 pmHow can i build this in the actionlist? You create new a new action by double-clicking on an actionlist component dropped on your form. This opens the action editor. Click the blue + button to create a new action, and give it an appropriate name in properties page of the Object Inspector, where you would also set the Caption and maybe its ShortCut, Hint, ImageIndex etc. as well. To hook up the action to the rest of your application you go to the Events page of the Object Inspector and double-click on the OnExecute event of the new action. This will place you in a newly created event handler in the Source Editor where you can add appropriate code to get your action to do what you want. Alternatively, if there are already appropriate event handlers in your app, you just click on the down arrow of the event combo, and choose the appropriate handler presented in the list. If you open the .lfm of frmmain in the Lazarus address_book example application you can see how quite a number of such OnAction and OnUpdate events have been assigned to various database events. (The .lfm is a record of any such assignments which you make at design time using the Object Inspector). ---------------------------------------------------------------------- Robert W.B. · 2013-10-07 15:49 Thanks HowardPC for the excellent description. This will hopely solve my problem with the TActionlist. Best regards all of you and thanks for involving in my problem.  Freepascal/Lazarus and it's Forum is the best. ---------------------------------------------------------------------- Robert W.B. · 2013-10-08 02:13 Hi again.I did all the stuff that You wrote HowardPC But, I got a new error instead in my DBF!!! I have attached a jpg file on the error. ---------------------------------------------------------------------- howardpc · 2013-10-08 09:05 Well if you name all your project MyMigraine you should expect it to give you a headache.  Make sure in the .lpr (main program file) for you project you have this line Code: [Select]  RequireDerivedFormResource := True; and after Application.Initialize; you have this line Code: [Select]  Application.CreateForm(TForm1, Form1); ---------------------------------------------------------------------- Robert W.B. · 2013-10-08 10:55 Hi howardpc. Yes,this will hopely be a Migraine database I need for my migraine. I want MyMigraine to be a free database for everyone how suffers of Migraine. I have an experience of 48 years of Migraine,so the MyMigraine will include some important experience details for new or old Migrainers. What I can see, the lines are in the code, that You wrote but, in the adress book demo of Lazarus,there is some files that isn't created in MyMigraine Database. In the bottom of the adress database demo of Lazarus is: initialization {$i frmmain.lrs} This file is not called in MyMigraine Database! How to create it? Missing files in MyMigraine = frmmain.lrs(Unit1.lrs), frmmain.ppu(Unit1.ppu), frmmain.o(Unit1.o), // frmmain.rst(Unit1.rst)  How can I create these files? Best regards ---------------------------------------------------------------------- howardpc · 2013-10-08 11:32 Quote from: robbanux on October 08, 2013, 12:55:57 pmIn the bottom of the adress database demo of Lazarus is: initialization {$i frmmain.lrs} This file is not called in MyMigraine Database! How to create it? Delete both lines, they're not needed. All you need is a Code: [Select]{$R *.lfm} in the implementation section ---------------------------------------------------------------------- wp · 2013-10-08 12:03 I think this project is damaged somehow. Maybe you did not start in the correct way? Create a new project ("File" / "New" / "Project" / "Application") and compile. It must work. If not, your Lazarus is damaged --> clean you user profile and reinstall. Then add the features from your project step by step. ---------------------------------------------------------------------- Robert W.B. · 2013-10-08 17:23 Yes HowardPC    That was the key. Now I can run the MyMigrane DBF. I'm near the solution, because of Your help now I Think. Can I ask? ftString is text, ftDate is date but, How do I declare a DBCombobox? ft something How do I declare a DBCheckbox1? ft something How do I declare a DBMemo? ftMemo ?  255 characters? Best regards ---------------------------------------------------------------------- BigChimp · 2013-10-09 07:29 Please open a new thread for unrelated questions... FYI: DBMemo could have an ftMemo as underlying datatype. Don't specify a character limit - or use e.g. ftString that has a defined character limit. I'd suspect the natural fit for a DBCheckbox would be a boolean field. DBCombobox would probably use ftString values most easily. Thanks. ---------------------------------------------------------------------- Robert W.B. · 2013-10-09 15:32 Thanks for the Help.