Sign in Join

Live chat for Free Pascal, Lazarus, Delphi and every Pascal programmer.

Mailing lists / lazarus / 2010-05

Error: Identifier not found "CreateaNewIsland1Click"

6 messages · 4 people · –

Reply by email Subscribe to this list Your subscription

Read-only archive. Use j and k to move between messages.

Peter E Williams

Hi All,

I am now getting an identifier not found error. In the error messages window, if I select Help the lazarus cannot find the local HTML help file. I cannot find my way around the lazarus website. :-(

file set_max.pas
Uses
main_island;

{ set_max_form }

procedure Tset_max_form.OK_buttonClick(Sender:
TObject);
begin
line 42
CreateaNewIsland1Click(Sender);
//
main_island.CreateaNewIsland1Click(Sender);
end;

Hint: Start of reading config file /etc/fpc.cfg
Hint: End of reading config file /etc/fpc.cfg
Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386 Copyright (c) 1993-2009 by Florian Klaempfl
Target OS: Linux for i386
Compiling project1.pas
Compiling set_max.pas
set_max.pas(42,25) Error: Identifier not found "CreateaNewIsland1Click" set_max.pas(50) Fatal: There were 1 errors compiling module, stopping

file main_island.pas
type
  Tmain_island_form = class(TForm)
<snip>
    procedure make_an_island;
<snip>
  private
    { Private declarations }
  public
    { Public declarations }
    procedure CreateaNewIsland1Click(Sender: TObject);
  end;
<snip>
var
  main_island_form : Tmain_island_form;
procedure Tmain_island_form.CreateaNewIsland1Click(Sender: TObject);
begin
  make_an_island;
end; { CreateaNewIsland1Click }
Love and Friendship, Peter Eric Williams +61 3 6236-9675 (home or leave a message) Mobile 044-99-256-50 Proudly created in Australia. Quality Cross-Platform Games since 1970 with a Commodore PET 4016 with 16 Kilobytes of RAM (not Megabytes).

Reply by email

Vannus
to Peter E Williams

On 23 May 2010 00:56, Peter E Williams <

Show quoted text 20 lines
wrote: Hi All, I am now getting an identifier not found error. In the error messages window, if I select Help the lazarus cannot find the local HTML help file. I cannot find my way around the lazarus website. :-( >file set_max.pas Uses main_island; { set_max_form } procedure Tset_max_form.OK_buttonClick(Sender: TObject); begin > line 42 CreateaNewIsland1Click(Sender);

shouldn't this be main_island.CreateaNewIsland1Click(Sender); like below?

Show quoted text 14 lines
// main_island.CreateaNewIsland1Click(Sender); end; Hint: Start of reading config file /etc/fpc.cfg Hint: End of reading config file /etc/fpc.cfg Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386 Copyright (c) 1993-2009 by Florian Klaempfl Target OS: Linux for i386 Compiling project1.pas Compiling set_max.pas set_max.pas(42,25) Error: Identifier not found "CreateaNewIsland1Click" set_max.pas(50) Fatal: There were 1 errors compiling module, stopping

-V
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100523/2be6cba8/attachment.html>

Reply by email

patspiper
to Peter E Williams: I am now getting an identifier not found error. In the error messages window, if I select…

CreateaNewIsland1Click is a method of Tmain_island_form, and hence has to be invoked against a Tmain_island_form instance such as main_island_form.

Peter E Williams wrote 59 lines
Hi All, I am now getting an identifier not found error. In the error messages window, if I select Help the lazarus cannot find the local HTML help file. I cannot find my way around the lazarus website. :-( > file set_max.pas > Uses main_island; { set_max_form } procedure Tset_max_form.OK_buttonClick(Sender: TObject); begin > line 42 > CreateaNewIsland1Click(Sender); // main_island.CreateaNewIsland1Click(Sender); end; Hint: Start of reading config file /etc/fpc.cfg Hint: End of reading config file /etc/fpc.cfg Free Pascal Compiler version 2.4.0-2 [2010/03/06] for i386 Copyright (c) 1993-2009 by Florian Klaempfl Target OS: Linux for i386 Compiling project1.pas Compiling set_max.pas set_max.pas(42,25) Error: Identifier not found "CreateaNewIsland1Click" set_max.pas(50) Fatal: There were 1 errors compiling module, stopping > file main_island.pas > type Tmain_island_form = class(TForm) <snip> procedure make_an_island; <snip> private { Private declarations } public { Public declarations } procedure CreateaNewIsland1Click(Sender: TObject); end; <snip> var main_island_form : Tmain_island_form; procedure Tmain_island_form.CreateaNewIsland1Click(Sender: TObject); begin make_an_island; end; { CreateaNewIsland1Click }

Reply by email

Peter E Williams
to Vannus: On 23 May 2010 00:56, Peter E Williams < shouldn't this be…

Hi Vannus & All,

Love and Friendship, Peter Eric Williams +61 3 6236-9675 (home or leave a message) Mobile 044-99-256-50 Proudly created in Australia. Quality Cross-Platform Games since 1970 with a Commodore PET 4016 with 16 Kilobytes of RAM (not Megabytes). On Sun, 2010-05-23 at 03:11 +0100, Vannus wrote: > > > On 23 May 2010 00:56, Peter E Williams > wrote: > Hi All, > > I am now getting an identifier not found error. In the error > messages > window, if I select Help the lazarus cannot find the local > HTML help > file. I cannot find my way around the lazarus website. :-( > > >file set_max.pas > Uses > main_island; > > { set_max_form } > > procedure Tset_max_form.OK_buttonClick(Sender: > TObject); > begin > > line 42 > CreateaNewIsland1Click(Sender); > > > shouldn't this be main_island.CreateaNewIsland1Click(Sender); like > below? > > // > main_island.CreateaNewIsland1Click(Sender); > end; main_island_form.CreateaNewIsland1Click(Sender); is correct. Now it compiles on my desktop (Linux Ubuntu 10.10 LTS) Now the problem I have is that the default Form1 is in the project from the default project & I cannot figure out where I add *my* forms to the project and remove the default form1. Please tell me where this is documented. I used the Lazarus menu option (I'm on my laptop without Lazarus installed) to view the forms in the project but I couldn't find the "add forms to project" option anywhere. Also I could not find the project set default form or project name and icon options. This is compounded by the fact that the default path to the local html help files is blank even tho' it is apparently installed!!! Where in God's name is this documented?!? I find the lazarus website to be massive and there appears to not be a search option so that I can type in, Google style, what I am looking for. Also, IIRC in the view forms in project dialog clicking on the Help button does not do anything!!! Is this a bug?!? Surely if the help file is not found then couldn't we just have a showmessage('Help file not found!'); Maybe even print in the message window the path that it was searching for the help file. Preferably such that one can copy the path into a text editor, and then change the lazarus search path options (I lose track of this menu option too!) Having the documentation to read would really help!!! I am having problems getting the latest updates on the laptop. So, I'll need to investigate that. > Fond Regards, Peter W.

Reply by email

Vannus
to Andrew Brunner

Hi Peter,

in your main file (usually project1.lpr but i think yours was main_island.pas iirc) youll find something like...

uses
  Forms, Unit1, LResources, Unit2;
begin
  Application.Title:='Exit';
  Application.Initialize;
  Application.CreateForm(TForm1, Form1);
  Application.CreateForm(TForm2, Form2);
  Application.Run;
end.

those Application.CreateForm() bits are where you can add/remove your MyForm or MyMainIslandForm (in my case ive been lazy and left MainForm and SettingsForm called Form1 and Form2)
you will want yours to be something like
Application.CreateForm(TMyIslandForm, MyIslandForm); put your main form first so it is shown when your run the program.

dont forget to add whatever MyIslandFormUnit into the 'uses' if its not already there - like my (once again lazy) Unit1 and Unit2.

I also find freepascal.org site disorganised. although im using Lazarus over Delphi 5 Pro so it can't be all bad! freepascal excels at the compile anywhere thing.

HTH,
- V
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20100523/ba3c51e6/attachment-0001.html>

Reply by email