Lazarus

Programming => Packages and Libraries => LazUtils => Topic started by: bpilaz on February 08, 2019, 11:08:51 pm

Title: [Solved] FileUtil Error
Post by: bpilaz 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..
Title: Re: FileUtil Error
Post by: dsiders 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.
Title: Re: FileUtil Error
Post by: bpilaz 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  :)
Title: Re: FileUtil Error
Post by: lucamar 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 (http://wiki.freepascal.org/Category:Release_Notes) & FPC User changes (http://wiki.freepascal.org/Category:FPC_User_Changes_by_release) pages for the releases you have skip over.
Title: Re: FileUtil Error
Post by: bpilaz 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
Title: Re: FileUtil Error
Post by: lucamar 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 :)