So today, I fought with WebLabel to simply make it appear. I have one on a container that is created dynamically and embedded onto another container. The ones that are created initially by the app do not appear, while ones that are created later do appear. Debugging in the browser to get to the bottom of it, I notice that the invisible ones have height of 0, while the visible ones have expected height proportional to their initial style. This is just part of a whole can of problems associated with multiline = false for WebLabels…
Another problem… set the style of a single line WebLabel to something larger at runtime, it gets chopped to fit vertically into the original line height.
This got me searching because I’m gonna have to implement my own label that doesn’t suck. Nobody vertically centers text like WE does anymore. They use display: table-cell; vertical-align: center. IE9 and later, as well as the rest of browsers support it. Why are we still living in 2012 with an ugly vertical alignment hack that goes horribly wrong in all but textbook examples? References:
In general, I wonder more and more if the best solution is to use only the WebSDK.
JS debugging is a pain. All commands get sent in one go. You cannot step through each line that makes working with the SDK tough, imho.
For debugging purposes, add your client side code to a js file that gets downloaded in the HTMLHeader (but only during debugging). that you can put breakpoints on in safari and chrome.
Thank you Greg, good idea. But the code is often mixed with Xojo code (variables …), in several methods, etc… In practice, this is difficult.