View Issue Details

IDProjectCategoryView StatusLast Update
0026228LazarusLazDataDesktoppublic2014-05-27 23:04
ReporterDaniel GasparyAssigned ToMaxim Ganetsky 
PrioritynormalSeverityminorReproducibilityalways
Status closedResolutionfixed 
Platformx86-64OSLinuxOS VersionKubuntu 14.04
Product Version1.3 (SVN)Product Build25-05-2014 
Target VersionFixed in Version1.4 
Summary0026228: EResNotFound: Resource "ddconnection" not found
DescriptionWhen trying to create a new Connection(Postgresql) a EResNotFound is raised.
Steps To Reproduce1 - Create a new connection
2 - The problem will happen after setting the name of the connection.

(conneditor unit) TConnectionEditor.Create method:

      P.LoadFromLazarusResource(ImageNames[i]);

TagsNo tags attached.
Fixed in Revision45207
LazTarget-
WidgetsetGTK 2, Win32/Win64, Carbon, QT
Attached Files
  • datadresource.diff (1,604 bytes)
    Index: tools/lazdatadesktop/conneditor.pp
    ===================================================================
    --- tools/lazdatadesktop/conneditor.pp	(revision 45191)
    +++ tools/lazdatadesktop/conneditor.pp	(working copy)
    @@ -154,7 +154,7 @@
         begin
         P:=TPortableNetworkGraphic.Create;
         try
    -      P.LoadFromLazarusResource(ImageNames[i]);
    +      P.LoadFromResourceName(HInstance,ImageNames[i]);
           FImgList.Add(P,Nil);
         finally
           P.Free;
    Index: tools/lazdatadesktop/datapanel.pp
    ===================================================================
    --- tools/lazdatadesktop/datapanel.pp	(revision 45191)
    +++ tools/lazdatadesktop/datapanel.pp	(working copy)
    @@ -169,7 +169,7 @@
       FExportSB.Top:=4;
       FExportSB.Height:=22;
       FExportSB.Width:=22;
    -  P.LoadFromLazarusResource('qrybtn_export');
    +  P.LoadFromResourceName(HInstance,'qrybtn_export');
       FExportSB.Glyph.Assign(P);
       FExportSB.Flat:=True;
       FExportSB.OnClick:=@DoExport;
    @@ -179,7 +179,7 @@
       FCodeSB.Top:=4;
       FCodeSB.Height:=22;
       FCodeSB.Width:=22;
    -  P.LoadFromLazarusResource('qrybtn_code');
    +  P.LoadFromResourceName(HInstance,'qrybtn_code');
       FCodeSB.Glyph.Assign(P);
       FCodeSB.Flat:=True;
       FCodeSB.OnClick:=@DoCode;
    Index: tools/lazdatadesktop/lazdatadesktop.lpi
    ===================================================================
    --- tools/lazdatadesktop/lazdatadesktop.lpi	(revision 45191)
    +++ tools/lazdatadesktop/lazdatadesktop.lpi	(working copy)
    @@ -1,4 +1,4 @@
    -<?xml version="1.0"?>
    +<?xml version="1.0" encoding="UTF-8"?>
     <CONFIG>
       <ProjectOptions>
         <Version Value="9"/>
    
    datadresource.diff (1,604 bytes)

Activities

Zeljan Rikalo

2014-05-27 07:12

developer   ~0075252

Please attach example project.

Reinier Olislagers

2014-05-27 13:25

developer   ~0075256

Last edited: 2014-05-27 13:37

View 2 revisions

@Zeljan: reporter cannot provide a sample program.
Just reproduced his error:
He runs the data desktop supplied with Lazarus in the tools directory.
Menu connections, new connection, PostGreSQL using SQLDB, enter connection details

then the error message pops up:
Resource "ddconnection" not found

Probably due to moving from Laz resources to windres resources; see
conneditor.pp, line 157
      P.LoadFromLazarusResource(ImageNames[i]);

Reinier Olislagers

2014-05-27 13:53

developer  

datadresource.diff (1,604 bytes)
Index: tools/lazdatadesktop/conneditor.pp
===================================================================
--- tools/lazdatadesktop/conneditor.pp	(revision 45191)
+++ tools/lazdatadesktop/conneditor.pp	(working copy)
@@ -154,7 +154,7 @@
     begin
     P:=TPortableNetworkGraphic.Create;
     try
-      P.LoadFromLazarusResource(ImageNames[i]);
+      P.LoadFromResourceName(HInstance,ImageNames[i]);
       FImgList.Add(P,Nil);
     finally
       P.Free;
Index: tools/lazdatadesktop/datapanel.pp
===================================================================
--- tools/lazdatadesktop/datapanel.pp	(revision 45191)
+++ tools/lazdatadesktop/datapanel.pp	(working copy)
@@ -169,7 +169,7 @@
   FExportSB.Top:=4;
   FExportSB.Height:=22;
   FExportSB.Width:=22;
-  P.LoadFromLazarusResource('qrybtn_export');
+  P.LoadFromResourceName(HInstance,'qrybtn_export');
   FExportSB.Glyph.Assign(P);
   FExportSB.Flat:=True;
   FExportSB.OnClick:=@DoExport;
@@ -179,7 +179,7 @@
   FCodeSB.Top:=4;
   FCodeSB.Height:=22;
   FCodeSB.Width:=22;
-  P.LoadFromLazarusResource('qrybtn_code');
+  P.LoadFromResourceName(HInstance,'qrybtn_code');
   FCodeSB.Glyph.Assign(P);
   FCodeSB.Flat:=True;
   FCodeSB.OnClick:=@DoCode;
Index: tools/lazdatadesktop/lazdatadesktop.lpi
===================================================================
--- tools/lazdatadesktop/lazdatadesktop.lpi	(revision 45191)
+++ tools/lazdatadesktop/lazdatadesktop.lpi	(working copy)
@@ -1,4 +1,4 @@
-<?xml version="1.0"?>
+<?xml version="1.0" encoding="UTF-8"?>
 <CONFIG>
   <ProjectOptions>
     <Version Value="9"/>
datadresource.diff (1,604 bytes)

Reinier Olislagers

2014-05-27 13:53

developer   ~0075259

Attached patch lets the program compile & run. Not sure if this is the correct solution though.

Zeljan Rikalo

2014-05-27 14:05

developer   ~0075260

@Reinier, thanks.

Zeljan Rikalo

2014-05-27 14:06

developer   ~0075261

@Paul, pls. look at this issue & patch.I'm not so much in resources so don't know if patch is ok.

Maxim Ganetsky

2014-05-27 22:51

developer   ~0075264

Patch looks OK. I applied it, thanks.

Daniel Gaspary

2014-05-27 23:04

reporter   ~0075266

Fixed. Thank you.

Issue History

Date Modified Username Field Change
2014-05-26 23:32 Daniel Gaspary New Issue
2014-05-27 07:12 Zeljan Rikalo LazTarget => -
2014-05-27 07:12 Zeljan Rikalo Note Added: 0075252
2014-05-27 07:12 Zeljan Rikalo Assigned To => Zeljan Rikalo
2014-05-27 07:12 Zeljan Rikalo Status new => feedback
2014-05-27 13:25 Reinier Olislagers Note Added: 0075256
2014-05-27 13:37 Reinier Olislagers Note Edited: 0075256 View Revisions
2014-05-27 13:53 Reinier Olislagers File Added: datadresource.diff
2014-05-27 13:53 Reinier Olislagers Note Added: 0075259
2014-05-27 14:05 Zeljan Rikalo Note Added: 0075260
2014-05-27 14:06 Zeljan Rikalo Note Added: 0075261
2014-05-27 14:06 Zeljan Rikalo Assigned To Zeljan Rikalo => Paul Ishenin
2014-05-27 14:06 Zeljan Rikalo Status feedback => assigned
2014-05-27 17:20 Zeljan Rikalo Widgetset QT => GTK 2, Win32/Win64, Carbon, QT
2014-05-27 22:51 Maxim Ganetsky Fixed in Revision => 45207
2014-05-27 22:51 Maxim Ganetsky Note Added: 0075264
2014-05-27 22:51 Maxim Ganetsky Status assigned => resolved
2014-05-27 22:51 Maxim Ganetsky Fixed in Version => 1.4
2014-05-27 22:51 Maxim Ganetsky Resolution open => fixed
2014-05-27 22:51 Maxim Ganetsky Assigned To Paul Ishenin => Maxim Ganetsky
2014-05-27 23:04 Daniel Gaspary Note Added: 0075266
2014-05-27 23:04 Daniel Gaspary Status resolved => closed