Thursday, May 31, 2012

OS X 10.7.4 and HTMLViewer text fields

With the 10.7.4 update, some of you may have noticed that text input fields inside of HTMLViewers display with a black background. We have investigated the bug and unfortunately it is a bug in OS X and thus, out of our control (filed in Apple's bug system #11454320).


This issue only applies to unstyled input fields that draw with the normal system backgrounds. If you are in complete control of the content you are displaying, you can work around it by adding a style to your field. For example, changing the background color or adding a border.


Since some applications are not in control of all of the content they display with HTMLViewer, there exists a more drastic workaround. Real Studio 2011r4 contains a hidden preference that controls what version of the system your application will appear to be linked against. The flag can be changed by executing this Terminal command while the IDE is quit:

defaults write com.realsoftware.realstudio "Mac SDK Version" -string "10.6"


It an be undone by executing the following while the IDE is quit:

defaults delete com.realsoftware.realstudio "Mac SDK Version"

We do not support the use of this flag and recommend against using it unless you absolutely must. It is a global setting that applies to all projects compiled in the IDE while it is set. If you do use this, test your applications intensively.

4 comments:

Thomas Gutzmann said...

The workaround(s) didn't solve my problems. As it is very unlikely that Apple will update their software in due time, I had to decide to move from RealBasic to JavaFX (most probably a final move). Took me a few days, but now it works.

JavaFX uses a WebViewer which is completely identical for all platforms, so that solved other problems I had with the RealSoftware approach.

Cheers,

Thomas

Geoff Perlman said...

@ Thomas - I presume then that JavaFX doesn't use the native web renderer for the platform. Because if it does, it would have the same problem.

Geoff Perlman said...

Interesting. It appears that JavaFX uses WebKit so I would presume it would have the same bug.

Thomas Gutzmann said...

Hi Geoff,

yes, according to the documentation it's using WebKit. In an interview with one of the lead programmers of JavaFX WebEngine (http://fxexperience.com/2012/04/interview-with-peter-zhelezniakov/) I read: "Fortunately Webkit has well defined cross-platform core that we almost don’t have to touch."

Whatever "almost" means - they don't have this bug.

Using WebKit in JavaFX is more complicated than in RealBasic - but it works...

Cheers,

Thomas