Recent

Author Topic: RX library  (Read 40417 times)

tatamata

  • Hero Member
  • *****
  • Posts: 693
    • ZMSQL - SQL enhanced in-memory database
Re: RX library
« Reply #15 on: December 28, 2013, 10:57:09 am »
Hi,
In CodeTyphon Lazarus distribution, there are Rx and RxDBAware packages preinstalled.

So, you might try CodeTyphon (current version 4.60) or at least use their Rx package.


sin_dragan

  • Full Member
  • ***
  • Posts: 127
Re: RX library
« Reply #16 on: December 29, 2013, 07:02:40 am »
I tried to my work computer and on Linux Mint 32, still no luck. Instaled CT on Mint and works fine.

Tried with 2.4.8 from CodeTyphon and still no luck. :(

I'll finish the project and then compile it on CT.

Windows 7 64 bit
Lazarus 1.4.1 (w/fixes) FPC 2.6.4 win32

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: RX library
« Reply #17 on: December 29, 2013, 09:59:27 am »
Tried with 2.4.8 from CodeTyphon and still no luck. :(
I'm sorry, what is this 2.4.8 you guys keep going on about? Isn't it more useful to quote the SVN revision you're using? (I have the suspicion the CCR guys may not increase the version number for each revision)
http://wiki.lazarus.freepascal.org/RXfpc
https://lazarus-ccr.svn.sourceforge.net/svnroot/lazarus-ccr/components/rx

I've had this on a Laz/FPC trunk for a long  while and the package compiled ok but admittedly haven't really used it.

Or am I missing something quite basic?

Second: if you hit problems with the RX from CCR on regular Lazarus, I'd think posting a bug report and letting the devs fix the bux will be easier than switching to CodeTyphon???
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

sin_dragan

  • Full Member
  • ***
  • Posts: 127
Re: RX library
« Reply #18 on: December 29, 2013, 12:02:08 pm »
About 2.4.8, it's the package taken from CT.

I posted a bug report 0025465. You made a good point, the goal is to make it usable on versions of Lazarus/FPC.

I'll post here if anything changes.

Windows 7 64 bit
Lazarus 1.4.1 (w/fixes) FPC 2.6.4 win32

kjteng

  • Full Member
  • ***
  • Posts: 178
Re: RX library
« Reply #19 on: December 31, 2013, 03:14:17 pm »
I have got the same problem with ver2.6.1.134
I found that the mainly issue is that the file picDateEdit.lrs is missing.
To solve this problem
1. I made the picDateEdit.lrs (attached) and saved it in the ...lazarus\components\rx2 folder;
2. Add the following line in rxdbgrid.pas (some where at line 5459) 
      {$I picDateEdit.lrs}
Now rxlib works on my pc!
This is just a quick fix while waiting for the new version.
 

sin_dragan

  • Full Member
  • ***
  • Posts: 127
Re: RX library
« Reply #20 on: December 31, 2013, 03:51:23 pm »
@kjteng

Thank you, I followed your instructions and rxdbgrid works okay now.
Windows 7 64 bit
Lazarus 1.4.1 (w/fixes) FPC 2.6.4 win32

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: RX library
« Reply #21 on: December 31, 2013, 04:12:45 pm »
This is just a quick fix while waiting for the new version.
Why don't you submit it as a patch? May make the new version get there quicker ;)
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

wp

  • Hero Member
  • *****
  • Posts: 6331
Re: RX library
« Reply #22 on: December 31, 2013, 04:33:54 pm »
The issue is more subtle than just a missing file because this solution does not explain why the rx lib runs fine with fpc 2.7 without adding "picDateEdit.lrs".

I fear this solution is just a workaround. The missing resource is present in "tooledit.res". The author had decided in rev. 2798 to switch from the lazarus resource type "tooledit.lrs" to the Delphi-like resource "tooledit.res". Evidently the older compiler 2.6.x cannot handle this - I think I read somewhere about these changes.

Fortunately, this fix runs well also with fpc 2.7 although I had expected something like a "duplicate resource" error.
« Last Edit: January 20, 2014, 09:28:15 am by wp »
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

taazz

  • Hero Member
  • *****
  • Posts: 5363
Re: RX library
« Reply #23 on: December 31, 2013, 08:39:26 pm »
yeah it seems that fpc and pre compiled resources is not a good mix try to break apart the tooledit.res in to its items and build an .rc file which is a text script that instructs the fpc to create a res file andinclude that instead of the res. It should overcome the problem and still use the file resources instead of the memory resource that lrs file use.
Good judgement is the result of experience … Experience is the result of bad judgement.

OS : Windows 7 64 bit
Laz: Lazarus 1.4.4 FPC 2.6.4 i386-win32-win32/win64

kjteng

  • Full Member
  • ***
  • Posts: 178
Re: RX library
« Reply #24 on: January 01, 2014, 05:59:26 am »
This is just a quick fix while waiting for the new version.
Why don't you submit it as a patch? May make the new version get there quicker ;)
Sorry I am new to lazarus and the forum.  How and where can I submt the buts report to? :-[

kjteng

  • Full Member
  • ***
  • Posts: 178
Re: RX library
« Reply #25 on: January 01, 2014, 06:10:21 am »
..
I fear this solution is just a workaround. The missing resource is present in "tooledit.res". The author had decided in rev. 2798 to switch from the lazarus resource type "tooledit.lrs" to the Delphi-like resource "tooledit.res". Evidently the older compiler 2.6.x cannot handle this - I think I read somewhere about these changes.

Fortunately, this fix runs well also with fpc 2.7 although I had expected something like a "duplicate resource" error.
Yes, as I mentioned in my earlier reply, this is just a temporary solution.
There is no tooledit.lrs in the version I downloaded (svn2974,  there is a tooledit.res instead). Also, I noticed that reference to tooledit.lrs and picDateEdit have been commented with (* *). That is the reason why there is no  "duplicate resource" error.

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: RX library
« Reply #26 on: January 01, 2014, 11:00:39 am »
I fear this solution is just a workaround. The missing resource is present in "tooledit.res". The author had decided in rev. 2798 to switch from the lazarus resource type "tooledit.lrs" to the Delphi-like resource "tooledit.res". Evidently the older compiler 2.6.x cannot handle this - I think I read somewhere about these changes.
I haven't read that anywhere and used .res resources ok with 2.6.x for a while. Would be interesting to have a reference/bug report for that because it would certainly need to be reported.
Can't find anything in the 2.7.x changes either:
http://wiki.lazarus.freepascal.org/FPC_New_Features_Trunk
http://wiki.lazarus.freepascal.org/User_Changes_Trunk

I suspect it's not the compiler that has a problem but Lazarus.
Trunk Lazarus switched from .lrs to .res files IIRC (@taazz: it writes out .res files directly, probably using FPC's fcl-res package, without needing a .rc script/external resource compiler).
http://wiki.lazarus.freepascal.org/Lazarus_1.4.0_release_notes#IDE_Changes

Edit:
@kjteng:
I posted a bug report 0025465. You made a good point, the goal is to make it usable on versions of Lazarus/FPC.
See that bug report via the bugtracker link, top left of this page. Then look up that bug number:
http://bugs.freepascal.org/view.php?id=0025465
...seems like Dragan Krstevski   already posted your solution!
« Last Edit: January 01, 2014, 11:05:09 am by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

wp

  • Hero Member
  • *****
  • Posts: 6331
Re: RX library
« Reply #27 on: January 01, 2014, 12:35:49 pm »
Code: [Select]
Trunk Lazarus switched from .lrs to .res files IIRC (@taazz: it writes out .res files directly, probably using FPC's fcl-res package, without needing a .rc script/external resource compiler).Yes, you're correct, it is Lazarus, not fpc, your cited reference is the one that I read, but did not find. Since my trunk installation runs on fcp 2.7 I confused the two.

Is there a way to use the res file on pre-Laz-1.4 versions to avoid adding the picDateEdit resource twice?
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10

BigChimp

  • Hero Member
  • *****
  • Posts: 5740
  • Add to the wiki - it's free ;)
    • FPCUp, PaperTiger scanning and other open source projects
Re: RX library
« Reply #28 on: January 01, 2014, 12:43:57 pm »
Is there a way to use the res file on pre-Laz-1.4 versions to avoid adding the picDateEdit resource twice?
That was what I was wondering about, too. No idea, TBH.

You could include either the .lrs or the .res based on an {$IF...} construct checking for LCL version, I suppose. (Sorry, don't know the exact name - LCL_VERSION?)...
Edit: probably LCL_FULLVERSION, see http://lazarus-ccr.sourceforge.net/docs/lcl/lclversion/index.html
« Last Edit: January 01, 2014, 12:49:32 pm by BigChimp »
Want quicker answers to your questions? Read http://wiki.lazarus.freepascal.org/Lazarus_Faq#What_is_the_correct_way_to_ask_questions_in_the_forum.3F

Open source including papertiger OCR/PDF scanning:
https://bitbucket.org/reiniero

Lazarus trunk+FPC trunk x86, Windows x64 unless otherwise specified

wp

  • Hero Member
  • *****
  • Posts: 6331
Re: RX library
« Reply #29 on: January 01, 2014, 01:02:56 pm »
Quote
You could include [...] the .lrs
I'll try that. But I don't know how to create the lrs out of the res. Any idea?
Lazarus trunk / fpc 3.0.4 / all 32-bit on Win-10