Recent

Author Topic: Key Press  (Read 25694 times)

winni

  • Hero Member
  • *****
  • Posts: 3197
Re: Key Press
« Reply #15 on: October 15, 2020, 06:11:22 pm »
Code: [Select]

initialization
  {$I ake.lrs}


     

also 1 error
ake.pas(31,29) Error: method identifier expected


No, wrong. Two errors.
That the way things run:

Code: Pascal  [Select][+][-]
  1. {$R *.lfm}    
  2.  


Winni

Weitentaaal

  • Hero Member
  • *****
  • Posts: 503
  • Weitental is a very beautiful garbage depot.
Re: Key Press
« Reply #16 on: October 23, 2020, 10:55:11 am »
Thanks Jamie
 :)
Lazarus: 2.0.12 x86_64-win64-win32/win64
Compiler Version: 3.2.2

wp

  • Hero Member
  • *****
  • Posts: 11858
Re: Key Press
« Reply #17 on: October 23, 2020, 11:25:41 am »
Code: [Select]

initialization
  {$I ake.lrs}


     

also 1 error
ake.pas(31,29) Error: method identifier expected


No, wrong. Two errors.
That the way things run:

Code: Pascal  [Select][+][-]
  1. {$R *.lfm}    
  2.  
Winni, this is an almost 10 years old thread started at a time when Lazarus had not yet been able to work with .res resources. The syntax to $Include the lrs file in the initialization section is absolutely correct, it still can be used today, but the preferred way, of course, is to link the .res resource by means of the {$R directive, as you show. (https://wiki.lazarus.freepascal.org/Lazarus_Resources#Lazarus_resources).

The reason why the OP of that thread had seen the "method identifer expected" error was that he had added the TForm1.FormKeyDown to the implementation part of the unit, but not to the class declaration in the interface part.


 

TinyPortal © 2005-2018