Style sheet and Background Color Problem

Semi-related thread closed by author on http://forum.servoy.com/viewtopic.php?t=9203. While a somewhat related topic, a new Subject/Issue is introduced here not inferred by the original subject line in 9203.

ISSUE:
Forms are not honoring programmatic background color settings when a style is active.

SCENARIO:
Consider the following scenario:

  1. Style sheet is setting the default color to Light-Blue-A (hex notation ignored for ease of reading this thread);

  2. The style sheet sets a standard color for data entry fields. Let’s call this color Light-Blue-B. I am using standard Servoy CSS Style Sheet properties.

  3. A Data Change event examines the condition of data in a field. If the data is incorrect the field color is set to Red. Otherwise it is set to the standard data entry field color of Light-Blue-B (i.e. - exactly the same color as the Style sheet color setting).

  4. When this event fires, and the data passes validation successfully, the attempt to set the field to the standard data entry color (Light-Blue-B) fails. Instead, the default Form color of Light-Blue-A is used.

If I am not using the same color in the Data Change event code the problem does not occur. In other words, in scenario condition “3.” the true condition for data validation would be say “Light_Magenta” instead of “Light-Blue-B”: this will run fine.

Problem confirmed (100% replicable) with different hex color settings. I thought maybe I had the wrong blue chosen somewhere which is why I tried different color combo’s. The field display type’s I have tried are TEXT_FIELD and TYPE_AHEAD.

Is this a bug or am I doing something wrong? ver 3.5.1. I have double and triple-checked my code and the style sheet definition (looking for color override conditions). Forum feedback pls prior to issuing a bug filing.

A ps/edit after posting: this started to work again (properly). Nothing changed in the code/CSS. Any known issues (Java or ?) impacting color rendering??? The problem is 100% replicable when it goes into this “condition”. :(

Thanks, Michael

Strange that it sometimes works, and sometimes does not work.
I will try to see if I can trigger this bad behavior.

So we still have no idea about the “condition” that triggers it… Maybe it is only immediately after writing the solution - or something like this…

It figures… I cannot reproduce this either.

It’s a Murphy Law Bug - like when my car acts up and behaves perfectly at the mechanical garage. Maybe add this classification to the Bugzilla db :wink:

I’ll let you know if I can get a stable replicable condition.

Michael