Recent

Author Topic: [Solved] FileUtil Error  (Read 1865 times)

bpilaz

  • Newbie
  • Posts: 3
[Solved] FileUtil Error
« on: February 08, 2019, 11:08:51 pm »
Hi All..
 before now i use lazarus 1.0.14 i create app and OK to run, but now i use lazarus 2.0 my App Cant to run and get message :

ufilerenamer.pas(54,21) Error: Identifier not found "RenameFileUTF8"


in code before i use : FileUtil.RenameFileUTF8(...) , now the code not work please help me.. thanks..
« Last Edit: February 09, 2019, 07:49:18 am by bpilaz »

dsiders

  • Full Member
  • ***
  • Posts: 220
Re: FileUtil Error
« Reply #1 on: February 09, 2019, 12:47:58 am »
Hi All..
 before now i use lazarus 1.0.14 i create app and OK to run, but now i use lazarus 2.0 my App Cant to run and get message :

ufilerenamer.pas(54,21) Error: Identifier not found "RenameFileUTF8"


in code before i use : FileUtil.RenameFileUTF8(...) , now the code not work please help me.. thanks..

At some point, those routines were moved into lazfileutils instead of fileutils.
Lazarus 2.0.4 / FPC 3.0.4 / Windows 8.1 64-bit

bpilaz

  • Newbie
  • Posts: 3
Re: FileUtil Error
« Reply #2 on: February 09, 2019, 01:18:09 am »
Hi All..
 before now i use lazarus 1.0.14 i create app and OK to run, but now i use lazarus 2.0 my App Cant to run and get message :

ufilerenamer.pas(54,21) Error: Identifier not found "RenameFileUTF8"


in code before i use : FileUtil.RenameFileUTF8(...) , now the code not work please help me.. thanks..

At some point, those routines were moved into lazfileutils instead of fileutils.

hi desider.. thakyou verymuch. that work now  :)

lucamar

  • Hero Member
  • *****
  • Posts: 2023
Re: FileUtil Error
« Reply #3 on: February 09, 2019, 01:18:34 am »
Version 1.0.14 is very old by now; you'll probably find quite a lot more surprises like this one. Use the help or the wiki to find to where some functions/procedures/classes have been moved.

Particularly check, in the wiki, the Lazarus release notes & FPC User changes pages for the releases you have skip over.
« Last Edit: February 09, 2019, 01:34:46 am by lucamar »
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.

bpilaz

  • Newbie
  • Posts: 3
Re: FileUtil Error
« Reply #4 on: February 09, 2019, 01:47:13 am »
lucamar thank for u reply.. ,

yes my lazarus very old version and very surprise now  :D.
but i dont know why lazarus teams not keep consistency of "procedure and function location" , that make any error in other library/component 3Party. but even so lazarus is the best tool for programming

lucamar

  • Hero Member
  • *****
  • Posts: 2023
Re: FileUtil Error
« Reply #5 on: February 09, 2019, 02:07:20 am »
In most cases, as in your particular one, the deleted functions/procedures were simply wrappers calling the other ones, so they thought best to deprecate these wrappers and, after an adaptation time, delete them altogether.

Which, of course, is a problem for people like you, who use their version of Lazarus/Freepascal way beyond their "expiration" date :)
Turbo Pascal 3 CP/M - Amstrad PCW 8256 (512 KB !!!) :P
Lazarus 2.0.2/2.0.4  - FPC 3.0.4 on:
(K|L)Ubuntu 12..16, Windows XP SP3, various DOSes.