Sign in Join

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

Mailing lists / lazarus / 2011-03

exception class 'EReadError' with message Invalid value for property (onClick event in TMenuItem)

6 messages · 3 people · –

Reply by email Subscribe to this list Your subscription

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

Peter Williams

Hi Lazarus List,
I am encountering a strange run time error... Project island_maker.exe raised exception class 'EReadError' with message Invalid value for property Error reading CreateaNewIsland1.OnClick: Invalid value for property procedure TForm1.CreateANewIslandClick(Sender: TObject);begin make_an_island;end; { CreateaNewIslandClick }{--------------------------------------------------------------------} // where make_an_island is procedure TForm1.make_an_island; object Form1: TForm1 Left = 131 Height = 585 Top = 47 Width = 917 Caption = 'Form1' ClientHeight = 565 ClientWidth = 917 Menu = MainMenu1 LCLVersion = '0.9.31' object Memo1: TMemo Left = 0 Height = 565 Top = 0 Width = 917 Align = alClient TabOrder = 0 end object MainMenu1: TMainMenu left = 64 top = 48 object File1: TMenuItem Caption = '&File' object CreateANewIsland: TMenuItem Caption = '&Create A New Island' OnClick = CreateANewIslandClick end object SaveIslandToFile: TMenuItem Caption = '&Save Island To File' OnClick = SaveIslandToFileClick end end object Options: TMenuItem Caption = '&Options' OnClick = OptionsClick end end object SaveDialog1: TSaveDialog left = 131 top = 48 endend

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110312/298a6bd1/attachment.html>

Reply by email

Peter Williams
to Peter Williams

Hi All,I am unable to debug this error. Can someone please download the sample application which gives this error and tell me what am I doing wrong?Download link: http://hotfile.com/dl/109861372/9072f69/island_maker_laz_001a.zip.html(zip archive of source and exe, 4028 KB).OS - Windows 7 Ultimate 32 BitLazarus 0.9.31 nb - error occurs immediately on run of project (F9) Best Regards,PEWHobart, Australia
From:
To:
Subject: exception class 'EReadError' with message Invalid value for property (onClick event in TMenuItem) Date: Sat, 12 Mar 2011 06:07:46 +1100

Hi Lazarus List,
I am encountering a strange run time error... Project island_maker.exe raised exception class 'EReadError' with message Invalid value for property Error reading CreateaNewIsland1.OnClick: Invalid value for property procedure TForm1.CreateANewIslandClick(Sender: TObject);begin make_an_island;end; { CreateaNewIslandClick }{--------------------------------------------------------------------} // where make_an_island is procedure TForm1.make_an_island; object Form1: TForm1 Left = 131 Height = 585 Top = 47 Width = 917 Caption = 'Form1' ClientHeight = 565 ClientWidth = 917 Menu = MainMenu1 LCLVersion = '0.9.31' object Memo1: TMemo Left = 0 Height = 565 Top = 0 Width = 917 Align = alClient TabOrder = 0 end object MainMenu1: TMainMenu left = 64 top = 48 object File1: TMenuItem Caption = '&File' object CreateANewIsland: TMenuItem Caption = '&Create A New Island' OnClick = CreateANewIslandClick end object SaveIslandToFile: TMenuItem Caption = '&Save Island To File' OnClick = SaveIslandToFileClick end end object Options: TMenuItem Caption = '&Options' OnClick = OptionsClick end end object SaveDialog1: TSaveDialog left = 131 top = 48 endend

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110312/901ed843/attachment.html>

Reply by email

Alexander Klenin
to Peter Williams

2011/3/12 Peter Williams :

Hi All, I am unable to debug this error. Can someone please download the sample application which gives this error and tell me what am I doing wrong?

Your .lrs file is out of sync with .lfm file.
I do not know how it got into that state, but since you are using modern Lazarus anyway,
I recommend just switching to FPC resources.

Alexander S. Klenin

Reply by email

Mattias Gaertner
to Alexander Klenin
Show quoted text 7 lines
2011/3/12 Peter Williams : > Hi All, > > I am unable to debug this error. Can someone please download the sample > application which gives this error and tell me what am I doing wrong? Your .lrs file is out of sync with .lfm file.

Just remove the .lrs file. Open the unit and save it. The IDE will recreate the lrs file from the lfm file.

I do not know how it got into that state, but since you are using modern Lazarus anyway, I recommend just switching to FPC resources.

Mattias

Reply by email

Peter Williams
to Mattias Gaertner

Hi Mattias and All,

Show quoted text 18 lines
Date: Sat, 12 Mar 2011 13:07:31 +0100 From: To: Subject: Re: [Lazarus] FW: exception class 'EReadError' with message Invalid value for property (onClick event in TMenuItem) On Sat, 12 Mar 2011 22:00:31 +1000 Alexander Klenin wrote: > 2011/3/12 Peter Williams : > > Hi All, > > > > I am unable to debug this error. Can someone please download the sample > > application which gives this error and tell me what am I doing wrong? > > Your .lrs file is out of sync with .lfm file. Just remove the .lrs file. Open the unit and save it. The IDE will recreate the lrs file from the lfm file.

Okay and thanks, that works now.
Just wondering... what exactly IS a .lrs file? What does the extension stand for?

Show quoted text 9 lines
> I do not know how it got into that state, but since you are using > modern Lazarus anyway, > I recommend just switching to FPC resources. Mattias

Best Regards,PEW

Show quoted text 5 lines
-- _______________________________________________ Lazarus mailing list http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus.freepascal.org/pipermail/lazarus/attachments/20110313/b3aa9303/attachment.html>

Reply by email

Mattias Gaertner
to Peter Williams
Show quoted text 23 lines
Hi Mattias and All, > Date: Sat, 12 Mar 2011 13:07:31 +0100 > From: > To: > Subject: Re: [Lazarus] FW: exception class 'EReadError' with message Invalid value for property (onClick event in TMenuItem) > > On Sat, 12 Mar 2011 22:00:31 +1000 > Alexander Klenin wrote: > > > 2011/3/12 Peter Williams : > > > Hi All, > > > > > > I am unable to debug this error. Can someone please download the sample > > > application which gives this error and tell me what am I doing wrong? > > > > Your .lrs file is out of sync with .lfm file. > > Just remove the .lrs file. Open the unit and save it. The IDE will > recreate the lrs file from the lfm file. Okay and thanks, that works now. Just wondering... what exactly IS a .lrs file? What does the extension stand for?

Lazarus ReSource file.
It is an include file with binary data converted to string constants.

Mattias

Reply by email