...\sqldblaz.pas(18,42) Error: Identifier not found "Register" lazarus / 16-Databases ---------------------------------------------------------------------- dahaiou · 2012-07-20 17:27 Using Lazarus 0.9.30.4 32bit on a W7 64 bit system. I don't have any of the Database Connection tools available in the IDE. According to a tutorial I found, I need to install the package "sqldblaz.lpk". So, When selecting Package -> Install/Uninstall Packages, a dialogue pops up with two lists of packages, one is labelled "Install" the other "Do not install" The package that I want "sqldblaz 1.0.1" appears in the list labelled "Do not install". First thing I am wondering about: What is the problem with the package "sqldblaz"? Why does the IDE recommend me to NOT install it ???? And why are there so many other packages in that same list? Why are they there in the first place, if you are not allowed to install them? However, I decided to go against the advice of the IDE and tried installing it anyway: So, I marked "sqldblaz 1.0.1" and pressed "Install Selection". Suddenly that package appears in the list on the left - apparently it's OK to install now, when it wasn't a moment ago. So, I press "Save and Rebuild IDE". A new dialogue pops up "Confirm new package set for the IDE" and I press Continue. Almost immediately I get a compilation failure for this module: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register" when I remove the package again, the IDE rebuilds OK. How can I go forward from here? ---------------------------------------------------------------------- Leledumbo · 2012-07-20 17:40 QuoteSo, When selecting Package -> Install/Uninstall Packages, a dialogue pops up with two lists of packages, one is labelled "Install" the other "Do not install" The package that I want "sqldblaz 1.0.1" appears in the list labelled "Do not install". First thing I am wondering about: What is the problem with the package "sqldblaz"? Why does the IDE recommend me to NOT install it ???? And why are there so many other packages in that same list? Why are there there in the first place, if you are not allowed to install them?There's a misperception here. The correct way to interpret the dialog is the "Install" group is the ones that would be / already installed, while the "Do not install" group is the ones that would be / already uninstalled. And for your "so many other packages", which ones do you mean? The default distribution contains a lot of packages, but not all of them are installed. It's up to you to customize as you need. QuoteAlmost immediately I get a compilation failure for this module: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register" when I remove the package again, the IDE rebuilds OK. How can I go forward from here?Try to open the package, ensure registersqldb has Register Unit checked in File Properties. ---------------------------------------------------------------------- dahaiou · 2012-07-20 18:14 QuoteThere's a misperception here. The correct way to interpret the dialog is the "Install" group is the ones that would be / already installed, while the "Do not install" group is the ones that would be / already uninstalled.I know, I realised this after fiddling with it for a while. I just see it as an irritating fault if there is a list of packages available for installation but the user is told the exact opposite right to his face by the IDE. QuoteAnd for your "so many other packages", which ones do you mean?I meant all of them. There are fifty odd of them in the list. Anyways, on to the actual fault: QuoteTry to open the package, ensure registersqldb has Register Unit checked in File Properties.Thanks for the tip. I opened it and yes, it does have that field checked. So there's got to be something else going on. Also, when I try to compile registersqldb.pas on its own I get the following: ...\lazarus\components\sqldb\registersqldb.pas(1,1) Fatal: Can't find unit LResources used by registersqldb Any other ideas? ---------------------------------------------------------------------- Leledumbo · 2012-07-20 22:12 QuoteThanks for the tip. I opened it and yes, it does have that field checked. So there's got to be something else going on.Could you post the file content here? It should be short. QuoteAlso, when I try to compile registersqldb.pas on its own I get the following: ...\lazarus\components\sqldb\registersqldb.pas(1,1) Fatal: Can't find unit LResources used by registersqldbOf course, the unit is supposed to compile with options set in the lpk, you can't directly compile it plainly (unless your compiler options include unit path of its dependencies). ---------------------------------------------------------------------- dahaiou · 2012-07-20 23:59 QuoteCould you post the file content here? It should be short.Well, I'm extremely grateful for any help. Don't know if 411 lines fits your definition of short but here goes: Code: [Select]   // rfemoved // ---------------------------------------------------------------------- Leledumbo · 2012-07-21 00:01 Actually, I'm asking for sqldblaz.pas, not registersqldb.pas... ---------------------------------------------------------------------- dahaiou · 2012-07-21 07:54 Ah, then I see what you mean about short .  Here it is: Code: [Select]{ This file was automatically created by Lazarus. Do not edit!   This source is only used to compile and install the package.  } unit SQLDBLaz; interface uses   registersqldb, sqldb, SQLStringsPropertyEditorDlg, LazarusPackageIntf; implementation procedure Register; begin   RegisterUnit('registersqldb', @registersqldb.Register);   RegisterUnit('SQLStringsPropertyEditorDlg',     @SQLStringsPropertyEditorDlg.Register); end; initialization   RegisterPackage('SQLDBLaz', @Register); end. ---------------------------------------------------------------------- Leledumbo · 2012-07-21 11:38 Remove the bold one: Quoteprocedure Register; begin   RegisterUnit('registersqldb', @registersqldb.Register);   RegisterUnit('SQLStringsPropertyEditorDlg',     @SQLStringsPropertyEditorDlg.Register); end; Ensure SQLStringsPropertyEditorDlg in File Properties only have Use Unit checked, Register Unit should be unchecked. ---------------------------------------------------------------------- dahaiou · 2012-07-21 12:24 YEAASSSS !! This did it, though I have no idea why ... The package compiled and the IDE was rebuilt correctly, AND the new SQLdb tab is now available in the IDE. Won't have time to start using it right now, but I'll be back with more questions in a little while. There's bound to be a few more hitches before I get it off the ground. Just one quick question, since we are on this subject: Is there a way to arrange the IDE tabs in a different order? The new SQLdb tab is now the last one, far off to the right, and I have to scroll right before I can select it. I'd like to have it somewhere among the first ten or so. Big thanks for your help! ---------------------------------------------------------------------- Leledumbo · 2012-07-21 12:50 QuoteJust one quick question, since we are on this subject: Is there a way to arrange the IDE tabs in a different order?No(t so easily) currently, it's just a little while ago somebody else was asking the same question: http://forum.lazarus.freepascal.org/index.php/topic,176 13.0/topicseen.html ---------------------------------------------------------------------- dahaiou · 2012-07-21 13:12 OK, thanks, and sorry for drifting off-topic, but I had a look at that thread and found the following suggestion: QuoteRight click on components palete and select "View All" option (the only one)But I'm not having any luck right clicking on the Components Palette. I see no effect at all when I try, no options or menus or anything else. ---------------------------------------------------------------------- Leledumbo · 2012-07-21 13:24 Perhaps a new feature that's not available in latest stable release (I have it here with Lazarus 1.1 r37XXX)