Recent

Author Topic: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"  (Read 8084 times)

dahaiou

  • New Member
  • *
  • Posts: 40
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?
« Last Edit: July 20, 2012, 07:39:20 pm by dahaiou »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8244
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #1 on: July 20, 2012, 07:40:20 pm »
Quote
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 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.
Quote
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?
Try to open the package, ensure registersqldb has Register Unit checked in File Properties.

dahaiou

  • New Member
  • *
  • Posts: 40
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #2 on: July 20, 2012, 08:14:05 pm »
Quote
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.
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. >:D

Quote
And 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:

Quote
Try 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

  • Hero Member
  • *****
  • Posts: 8244
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #3 on: July 21, 2012, 12:12:47 am »
Quote
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.
Could you post the file content here? It should be short.
Quote
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
Of 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

  • New Member
  • *
  • Posts: 40
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #4 on: July 21, 2012, 01:59:35 am »
Quote
Could 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 //
« Last Edit: July 21, 2012, 02:21:48 pm by dahaiou »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8244
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #5 on: July 21, 2012, 02:01:27 am »
Actually, I'm asking for sqldblaz.pas, not registersqldb.pas... :-[

dahaiou

  • New Member
  • *
  • Posts: 40
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #6 on: July 21, 2012, 09:54:57 am »

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

  • Hero Member
  • *****
  • Posts: 8244
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #7 on: July 21, 2012, 01:38:37 pm »
Remove the bold one:
Quote
procedure 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

  • New Member
  • *
  • Posts: 40
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #8 on: July 21, 2012, 02:24:54 pm »
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!
« Last Edit: July 21, 2012, 02:29:37 pm by dahaiou »

Leledumbo

  • Hero Member
  • *****
  • Posts: 8244
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #9 on: July 21, 2012, 02:50:48 pm »
Quote
Just 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,17613.0/topicseen.html

dahaiou

  • New Member
  • *
  • Posts: 40
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #10 on: July 21, 2012, 03:12:04 pm »
OK, thanks, and sorry for drifting off-topic, but I had a look at that thread and found the following suggestion:
Quote
Right 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

  • Hero Member
  • *****
  • Posts: 8244
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: ...\sqldblaz.pas(18,42) Error: Identifier not found "Register"
« Reply #11 on: July 21, 2012, 03:24:55 pm »
Perhaps a new feature that's not available in latest stable release (I have it here with Lazarus 1.1 r37XXX)

 

TinyPortal © 2005-2018