Lazarus

Using the Lazarus IDE => General => Topic started by: lijinjie on April 20, 2021, 09:09:37 am

Title: Get a error when I try to create a new package..
Post by: lijinjie on April 20, 2021, 09:09:37 am
I wanted to move my old package from Delphi to Lazarus.

when I click the opinion 【create new package】,then a  error window came out! check the attachment.

Anybody met this problem and how did you solve it?
Title: Re: Get a error when I try to create a new package..
Post by: GetMem on April 20, 2021, 10:43:26 am
Hi lijinjie,

This is a bug in packagemanager.pas:
Code: Pascal  [Select][+][-]
  1. function TPkgManager.DoNewPackage: TModalResult;
  2. var
  3.   NewPackage: TLazPackage;
  4. begin
  5.   Result:=mrCancel;
  6.   // create a new package with standard dependencies
  7.   ShowMessage(lisPkgMangNewPackage);
  8.   NewPackage:=PackageGraph.CreateNewPackage(ExtractPasIdentifier(lisPkgMangNewPackage,true));  
  9.   //...
  10. end

ExtractPasIdentifier not working for some languages(lisPkgMangNewPackage = 'NewPackage' in English). As a quick fix just switch back to English in Lazarus Menu->Tools->Options->General->Language. Create the new package, save it, then you can return to your preferred language.
Title: Re: Get a error when I try to create a new package..
Post by: lijinjie on April 20, 2021, 06:32:17 pm
Hi lijinjie,

This is a bug in packagemanager.pas:
Code: Pascal  [Select][+][-]
  1. function TPkgManager.DoNewPackage: TModalResult;
  2. var
  3.   NewPackage: TLazPackage;
  4. begin
  5.   Result:=mrCancel;
  6.   // create a new package with standard dependencies
  7.   ShowMessage(lisPkgMangNewPackage);
  8.   NewPackage:=PackageGraph.CreateNewPackage(ExtractPasIdentifier(lisPkgMangNewPackage,true));  
  9.   //...
  10. end

ExtractPasIdentifier not working for some languages(lisPkgMangNewPackage = 'NewPackage' in English). As a quick fix just switch back to English in Lazarus Menu->Tools->Options->General->Language. Create the new package, save it, then you can return to your preferred language.


 Thanks so much! I'll put what you replied to me into my bookmarks.  Before I saw your reply ,I reinstalled Lazarus to english version ,Got succeeded converting my first old wiget from delphi to Lazarus. 
Title: Re: Get a error when I try to create a new package..
Post by: PascalDragon on April 21, 2021, 09:16:15 am
This is a bug in packagemanager.pas:
Code: Pascal  [Select][+][-]
  1. function TPkgManager.DoNewPackage: TModalResult;
  2. var
  3.   NewPackage: TLazPackage;
  4. begin
  5.   Result:=mrCancel;
  6.   // create a new package with standard dependencies
  7.   ShowMessage(lisPkgMangNewPackage);
  8.   NewPackage:=PackageGraph.CreateNewPackage(ExtractPasIdentifier(lisPkgMangNewPackage,true));  
  9.   //...
  10. end

ExtractPasIdentifier not working for some languages(lisPkgMangNewPackage = 'NewPackage' in English). As a quick fix just switch back to English in Lazarus Menu->Tools->Options->General->Language. Create the new package, save it, then you can return to your preferred language.

Is this already reported as a bug?
Title: Re: Get a error when I try to create a new package..
Post by: GetMem on April 22, 2021, 06:14:24 am
@PascalDragon
Quote
Is this already reported as a bug?
It's already fixed in r65049.

@lijinjie
Can you please test it with Lazarus trunk?
Title: Re: Get a error when I try to create a new package..
Post by: PascalDragon on April 22, 2021, 09:08:39 am
@PascalDragon
Quote
Is this already reported as a bug?
It's already fixed in r65049.

Even better :D
Title: Re: Get a error when I try to create a new package..
Post by: lijinjie on April 26, 2021, 08:03:13 pm
@PascalDragon
Quote
Is this already reported as a bug?
It's already fixed in r65049.

@lijinjie
Can you please test it with Lazarus trunk?

Sorry for my late reply.  I will try if it won't affect the current version. 
 
TinyPortal © 2005-2018