I will change the code and do a retest. Thanks for the hint. 

Clemens


> On 7. Oct 2024, at 06:27, Michael Strauß <michaelstr...@gmail.com> wrote:
> 
> You're setting a new value in the change listener of the iconColor
> property, which then fires off another change notification, and so on.
> I guess that you're not getting a new object if you use one of the
> predefined constants like "red", which breaks the cycle (as there's no
> change notification when the object is the same).
> So regardless of whether this worked in JFX22, your code seems wrong.
> 
> 
>> On Sun, Oct 6, 2024 at 7:26 PM Clemens Lanthaler
>> <clemens.lantha...@itarchitects.at> wrote:
>> 
>> Hi everyone,
>> 
>> I have just moved over my application (Photoslide) from JFX22 to JFX23 and I 
>> am facing the folling issue:
>> 
>> For any FontIcon (iKonli) where I set the color in web form I am getting the 
>> follwing exception:
>> 
>> Exception in thread "JavaFX Application Thread" java.lang.StackOverflowError
>>    at java.base/java.lang.String.substring(String.java:2930)
>>    at java.base/java.lang.String.substring(String.java:2898)
>>    at javafx.graphics@24-ea/javafx.scene.paint.Color.web(Color.java:403)
>>    at javafx.graphics@24-ea/javafx.scene.paint.Color.web(Color.java:646)
>>    at javafx.graphics@24-ea/javafx.scene.paint.Color.valueOf(Color.java:667)
>>    at javafx.graphics@24-ea/javafx.scene.paint.Paint.valueOf(Paint.java:124)
>>    at 
>> org.photoslide.MainViewController.lambda$initialize$1(MainViewController.java:266)
>> 
>> The corresponding code I am using and which is working with JFX22:
>> 
>> processListIcon.iconColorProperty().addListener((o) -> {
>>            if (!taskProgressView.getTasks().isEmpty()) {
>>                processListIcon.setIconColor(Paint.valueOf("lightgreen"));
>>            } else {
>>                processListIcon.setIconColor(Paint.valueOf("#c5c5c5"));
>>            }
>>        });
>> Changing "#c5c5c5" to e.g. "red" than all is fine. Also using the RGB values 
>> is resulting in an Exception (Color paint = new Color(0.7725, 0.7725, 
>> 0.7725, 1.0);)
>> 
>> 
>> This issue is also present in JFX24ea and I have searched if iKonli has an 
>> open issue. It seems that there is an issue.
>> 
>> cheers,
>> Clemens
>> 
>> 
>> --
>> ITArchitects
>> CEO: B.Sc. Clemens Lanthaler
>> Forchachstrasse 3
>> A-6166 Fulpmes
>> Tel.: +43 (0)650 855 2954
>> email: off...@itarchitects.at
>> homepage: http://www.itarchitects.at
>> -------------------------------------------------
>> Notice: This e-mail and any attachments are confidential and may be 
>> privileged.
>> If you are not the intended recipient, notify the sender immediately, 
>> destroy all
>> copies from your system and do not disclose or use the information for any 
>> purpose.
>> Diese E-Mail inklusive aller Anhaenge ist vertraulich und koennte 
>> bevorrechtigtem
>> Schutz unterliegen. Wenn Sie nicht der beabsichtigte Adressat sind, 
>> informieren Sie
>> bitte den Absender unverzueglich, loeschen Sie alle Kopien von Ihrem System 
>> und
>> veroeffentlichen Sie oder nutzen Sie die Information keinesfalls, gleich zu 
>> welchem Zweck.

Reply via email to