Recent

Author Topic: KOL-CE with FPC - Bugs found  (Read 13779 times)

br_klaus

  • Newbie
  • Posts: 5
KOL-CE with FPC - Bugs found
« on: February 02, 2015, 08:12:52 pm »
I tried to compile and install KOL-CE in Lazarus with FPC 3.1.1. But there were some problems:

The official “latest” version of KOL-CE I found on the KOL-CE homepage (kol-ce.net): KOL 3.22 with MCK 3.23 (which is equal to 3.20).
But these are versions without (in MCK) mentioning FPC.
So I downloaded the latest svn-version: https://kol-ce.svn.sourceforge.net/svnroot/kol-ce/trunk/: KOL 2.88 – MCK 2.87.

It seems that this version of KOL was for FPC 2.2x or 2.4x. But now I am using FPC 3.1.1 (coming with CodeTyphon). Since FPC 2.5x Lazarus/FPC made some changes, so I introduced a new define (ifdef _F25orHigher).

The changes are:
   LazarusIDE.DoOpenEditorFile --> has one more parameter
   SourceEditorWindow --> now use SourceEditorManagerIntf
   GetLookupRootForComponent --> now in unit PropEditUtils

(The changes made in KOL and MCK are in the attached file KOLcorr.txt)

With these changes made, I finally succeeded in compiling the MirrorKOLPackage.lpk
Then I installed, also OK

But now running a simple test with only one form with a Button, I had some problems.
1) I got the error message: “KOLUnit1.pas(56,2) Fatal: It is not possible to include a file that starts with an UTF-8 BOM in a module that uses a different code page”
I had to delete the BOM at the beginning of unit1_1.inc manually.
Therfore I deleted the insertion of Utf8BOM in the procedure TKOLFormGenerateINC, where the source code said SL.Add ({$IFDEF FPC} Utf8BOM + {$ENDIF} Signature )

2) The caption `Übung` was not shown correctly, I had to write in NewForm1 function the button caption as Utf8Decode(´Übung´), now it was OK.

3) But now there are many problems with the Object manager and Codetolols etc.
Clicking on an event in the object manager does not create the correspondent procedure in the source window, Clicking on the form or the button does not produce any effect in the object manager, but is always creating error (cannot find mewthod etc.)

It seems that there must be some bug in TKOLObjectEditor. I found there a real define mismatch!


The interface part (in MIRROR.PAS) looks like this:

(ifdef FPC)
   TKOLObjectCompEditor = …
      .Edit
(else Delphi)
   TKOLObjectCompEditor = …
      (ifdef _D6orHigher)   CountEvents   .CheckEdit    .EditProperty
      (else)         CountEvents   ChekEdit
         (ifdef FPC)   EditProperty         <-- can never be compiled!
         (else)      EditProperty
         (endif)
      (endif)
      Edit
(endif FPC)

TKOLEveentPropEditor = …               <--- nothing if FPC!
   (ifdef _D2)   GetTrimmedEventName   GetFormMethodName
   (endif)
   (ifndef FPC)   Edit
   (endif)


(_D2) is only defined if Delphi (Ver90), therefore undefined if FPC.
If the Compiler is FPC then it will never be able to read the second Ifdef FPC-part in TKOLObjectCompEditor, because this is in the else-part. This means that it never will read that there is a procedure Editproperty (and the same happened in the implementation part).
And then the Ifndef FPC in TKOLOnEventPropEditor would also be useless.
But the register procedures (in MIRROR and MCKObjs) include TKOLOnEventPropEditor too, with or without FPC.


And the implementation part looks like this:

TKOLObjectCompEditor
   (idfef FPC)   Edit;      begin … end;
   (else Delphi)
      (ifdef _D6orHigher)   CheckEdit
      (else)         CheckEdit
      (endif)
         begin … if Continue then   (ifndef FPC) …  <--- useless
                     (endif)
         end;
      CountEvents      begin … end;
      Edit   begin .. end;
      (ifdef _D6orHigher)      EditProperty
      (else)
         (ifdef FPC)      EditProperty      <--- can never be compiled
         (else)         EditProperty
         (endif)
      (endif)
      ReplaceBest
            begin  … (ifndef FPC) ….. (endif)      <--- useless
            end;
         begin …  (ifndef FPC) … (endif)         <--- useless
         end;
   (endif FPC)

   (ifdef _D2)
      TKOLOnEventPropEditor
         GetFromMethodName
            begin …    (ifdef _D2) …      <--- useless
                  (else _D3orHigher)   <--- will never be compiled
                  (endif)
            end;
         GetTrimmedEventname    begin  end;
   (endif)



In Lazarus TdefaultComponentEditor has both procedures, Edit and EditProperty, but here the component would be only with Edit.

I hope this bug can be solved.
Thanks

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: KOL-CE with FPC - Bugs found
« Reply #1 on: February 03, 2015, 02:12:30 am »
Mmm...shouldn't you report to KOL-CE maintainer?

br_klaus

  • Newbie
  • Posts: 5
Re: KOL-CE with FPC - Bugs found
« Reply #2 on: February 03, 2015, 12:39:24 pm »
Mmm...shouldn't you report to KOL-CE maintainer?

Where can I do this?

It is said:
Report bugs, submit patches and ask questions at project's page at SourceForge: http://sourceforge.net/projects/kol-ce/

But there I cannot find any possibility to send a bug. What is going wrong?

Awkward

  • Full Member
  • ***
  • Posts: 135
Re: KOL-CE with FPC - Bugs found
« Reply #3 on: February 03, 2015, 01:42:56 pm »

br_klaus

  • Newbie
  • Posts: 5
Re: KOL-CE with FPC - Bugs found
« Reply #4 on: February 03, 2015, 02:05:55 pm »
You can try to report here: http://www.delphimaster.ru/cgi-bin/forum.pl?n=10

Unfortunately this is all in russian. I do not know how to send there my bug report. Is there no english page? Is there no possibility to contact directly Yury Sidorov who brought KOL-CE to Lazarus?

Awkward

  • Full Member
  • ***
  • Posts: 135
Re: KOL-CE with FPC - Bugs found
« Reply #5 on: February 03, 2015, 02:40:50 pm »
no separate english page there but english notes still ok. I can try to write not there

br_klaus

  • Newbie
  • Posts: 5
Re: KOL-CE with FPC - Bugs found
« Reply #6 on: February 03, 2015, 04:36:56 pm »
Thanks for your note you posted there.
I also tried to send an email to y.a.sidorov@gmail.com and yury_sidorov@mail.ru, the only two email addresses I could find in the internet of a Yury Sidorov who might be programmer of KOL-CE. Perhaps one is okay and will respond.

Leledumbo

  • Hero Member
  • *****
  • Posts: 8747
  • Programming + Glam Metal + Tae Kwon Do = Me
Re: KOL-CE with FPC - Bugs found
« Reply #7 on: February 03, 2015, 04:40:57 pm »
It is said:
Report bugs, submit patches and ask questions at project's page at SourceForge: http://sourceforge.net/projects/kol-ce/

But there I cannot find any possibility to send a bug. What is going wrong?
Hover the "Tickets" menu.

br_klaus

  • Newbie
  • Posts: 5
Re: KOL-CE with FPC - Bugs found
« Reply #8 on: February 03, 2015, 07:54:58 pm »
Thanks for the hint with "Tickets".
But there I could only see Bugs, not create any. I first had to register. Now I could send my bug report.

 

TinyPortal © 2005-2018