Lazarus

Programming => Packages and Libraries => Topic started by: JD on May 05, 2021, 09:05:55 pm

Title: Jujiboutils no longer compiles
Post by: JD on May 05, 2021, 09:05:55 pm
Hi there everyone,

Recently, after installing Lazarus/FPC using fpcup on another machine, I've discovered that Jujiboutils no longer compiles

Here is the Wiki page for the component/package
https://wiki.freepascal.org/jujiboutils (https://wiki.freepascal.org/jujiboutils)

The problem is line 247 in the file JLabel.pas, it says Identifier not found: DoMeasureTextPosition (see screenshot)

Can anybody help me resolve this problem and compile/install the package?

I'm using Lazarus 2.1.0/FPC 3.2

Cheers,

JD
Title: Re: Jujiboutils no longer compiles
Post by: wp on May 05, 2021, 10:47:05 pm
There is a recent change in TCustomLabel of trunk in which this method was removed. I contacted the committer, maybe it can be reverted.
Title: Re: Jujiboutils no longer compiles
Post by: JD on May 06, 2021, 09:47:58 am
Thanks wp. I look forward to hearing from you on whatever is decided.

JD
Title: Re: Jujiboutils no longer compiles
Post by: jujibo on May 06, 2021, 08:07:57 pm
I'll wait too before fixing it.

@JD In the meantime, synchronize to a working version of trunk (before the change that WP refers)
Title: Re: Jujiboutils no longer compiles
Post by: jujibo on May 07, 2021, 10:57:29 am
I have a fix ready, but will wait for the Lazarus developer's decision.

He has reimplemented the paint method and removed the DoMeasureTextPosition procedure, breaking compatibility with existing code.
If someone wants to delete a protected method, it's probably best to mark it as deprecated before deleting it. Inherited classes make use of protected procedures, for some reason they are protected and not private  :D

Regards
Title: Re: Jujiboutils no longer compiles
Post by: wp on May 07, 2021, 11:32:30 am
I still don't have a feedback. If I don't get feedback within, say, a few more days I'll re-add DoMeasureTextposition and mark it as deprecated. But I don't think that this will become reverted, so you could fix the issue right now anyway.
Title: Re: Jujiboutils no longer compiles
Post by: jujibo on May 07, 2021, 12:04:55 pm
I still don't have a feedback. If I don't get feedback within, say, a few more days I'll re-add DoMeasureTextposition and mark it as deprecated. But I don't think that this will become reverted, so you could fix the issue right now anyway.

Thanks WP. Next week I'll commit all the changes. First, I have to check other components changes. Probably I'll release a new version with more features.

If this isn't going to be reverted, don't worry about restoring and marking it as deprecated. Lazarus trunk users could sync to a prev version in the meantime.
Title: Re: Jujiboutils no longer compiles
Post by: Ondrej Pokorny on May 07, 2021, 06:34:59 pm
Hello, I'll take a look :)
Title: Re: Jujiboutils no longer compiles
Post by: jujibo on May 09, 2021, 07:24:15 pm

Can anybody help me resolve this problem and compile/install the package?

JD

Hi JD. There is a new version available:
https://sourceforge.net/projects/lazarus-ccr/files/Jujiboutils/jujiboutils-2.4.zip/download (https://sourceforge.net/projects/lazarus-ccr/files/Jujiboutils/jujiboutils-2.4.zip/download)

Title: Re: Jujiboutils no longer compiles
Post by: JD on May 12, 2021, 12:10:37 am

Can anybody help me resolve this problem and compile/install the package?

JD

Hi JD. There is a new version available:
https://sourceforge.net/projects/lazarus-ccr/files/Jujiboutils/jujiboutils-2.4.zip/download (https://sourceforge.net/projects/lazarus-ccr/files/Jujiboutils/jujiboutils-2.4.zip/download)

Thanks a million jujibo. I'll test it tomorrow and let you know how everything turns out.

JD
Title: Re: Jujiboutils no longer compiles
Post by: JD on May 15, 2021, 11:45:34 am
The latest version of Jujiboutils now compiles.

Thanks a million to all who helped me.

JD
Title: Re: Jujiboutils no longer compiles
Post by: jujibo on May 15, 2021, 12:24:19 pm
The latest version of Jujiboutils now compiles.

Thanks a million to all who helped me.


Thanks to you for reporting it.
Title: Re: Jujiboutils no longer compiles
Post by: JD on May 15, 2021, 02:31:09 pm
I should thank you. I am now also able to compile it in Linux for the first time.  :D

JD
Title: Re: Jujiboutils no longer compiles
Post by: wp on July 16, 2021, 01:13:02 pm
Hello, I'll take a look :)
Ondrej, I think this issue is still open because there is now another discussion in which it plays a role... (https://forum.lazarus.freepascal.org/index.php/topic,55391.0.html)
Title: Re: Jujiboutils no longer compiles
Post by: jujibo on July 16, 2021, 01:49:11 pm
Hello, I'll take a look :)
Ondrej, I think this issue is still open because there is now another discussion in which it plays a role... (https://forum.lazarus.freepascal.org/index.php/topic,55391.0.html)

Hi
AFAIK, there is no problem compiling jujiboutils with lazarus trunk. The problem reported in the link you posted, is related to another component: https://sites.google.com/site/lazpde/english/components/tmylabel  (https://sites.google.com/site/lazpde/english/components/tmylabel)
Title: Re: Jujiboutils no longer compiles
Post by: jdp on July 16, 2021, 03:06:43 pm

Can anybody help me resolve this problem and compile/install the package?

JD

Hi JD. There is a new version available:
https://sourceforge.net/projects/lazarus-ccr/files/Jujiboutils/jujiboutils-2.4.zip/download (https://sourceforge.net/projects/lazarus-ccr/files/Jujiboutils/jujiboutils-2.4.zip/download)

Hi. I have the same issue with an older control. I see that procedure sets the top and left value. What procedure did you use in its place?
Title: Re: Jujiboutils no longer compiles
Post by: wp on July 16, 2021, 03:45:14 pm
AFAIK, there is no problem compiling jujiboutils with lazarus trunk. The problem reported in the link you posted, is related to another component: https://sites.google.com/site/lazpde/english/components/tmylabel  (https://sites.google.com/site/lazpde/english/components/tmylabel)
Anyway, protected (and public) methods must not be removed without prior notice, i.e. by declaring them as "deprecated".
Title: Re: Jujiboutils no longer compiles
Post by: jujibo on July 16, 2021, 04:49:30 pm
Anyway, protected (and public) methods must not be removed without prior notice, i.e. by declaring them as "deprecated".

I agree totally with you. My response was because you have posted in a topic about jujiboutils  :D
Title: Re: Jujiboutils no longer compiles
Post by: jujibo on July 16, 2021, 04:56:08 pm
Hi. I have the same issue with an older control. I see that procedure sets the top and left value. What procedure did you use in its place?

I implemented in TJCustomLabel (unit jlabel):
Code: Pascal  [Select][+][-]
  1. procedure DoCalculateTextPosition(var TextTop: integer;
  2.       var TextLeft: integer); virtual;
To replace the removed procedure. I call it in Paint procedure. In this way, I don't care if it will be restored or not in Lazarus.
TinyPortal © 2005-2018