Recent

Author Topic: Get a error when I try to create a new package..  (Read 993 times)

lijinjie

  • New Member
  • *
  • Posts: 15
Get a error when I try to create a new package..
« 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?

GetMem

  • Hero Member
  • *****
  • Posts: 3355
Re: Get a error when I try to create a new package..
« Reply #1 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.

lijinjie

  • New Member
  • *
  • Posts: 15
Re: Get a error when I try to create a new package..
« Reply #2 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. 

PascalDragon

  • Hero Member
  • *****
  • Posts: 3061
  • Compiler Developer
Re: Get a error when I try to create a new package..
« Reply #3 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?

GetMem

  • Hero Member
  • *****
  • Posts: 3355
Re: Get a error when I try to create a new package..
« Reply #4 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?

PascalDragon

  • Hero Member
  • *****
  • Posts: 3061
  • Compiler Developer
Re: Get a error when I try to create a new package..
« Reply #5 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

lijinjie

  • New Member
  • *
  • Posts: 15
Re: Get a error when I try to create a new package..
« Reply #6 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