A spurious warning appears to be spurious.
In my last post, Carbon nibs under Lion, I gave a solution to the problem of Carbon nib (interface) files not being supported in Xcode 4, while Xcode 3 would not run under Mac OS X 10.7 (Lion). That solution was to run Interface Build 3.2.6 and convert the nibs to a newer format.
Toward the end of the post I mentioned that many windows in the converted nib files produced a warning: “This window’s content rectangle does not lie entirely on the screen with the menu bar and may not be completely visible for all screen resolutions and configurations.” In testing, these files did not exhibit any errant behavior, but shipping a product, even a beta, with build warnings is against our development guidelines.
Since that post (and in preparation for a proper build, without warnings), I did a little research and experimentation and discovered that the problem appears to be a minor issue with the conversion, where the resulting data is aberrant enough to generate a warning, but is handled correctly in the resulting application. Although I did not dig deeply enough to identify the exact source of the problem, it is related to window positioning (as one may have guessed).
The solution, oddly, is simply to open the offending nib file, select the (or each) window, click on the Size (ruler) tab in the Inspector, and then drag the window position image, even slightly. As far as I can discern, any movement (within the simulated window) fixes the problem; at least, it fixed it for all of my affected windows. Clearly, the size of the windows was not the issue, since that was not changed, and the position should never have been a problem, either, for windows with the ‘Center’ attribute enabled (as most of mine were). I also note that the windows I created from scratch since moving to this Lion/IB 3.2.6 setup were unaffected.
One other idiosyncrasy to note is that the build process also produces the following message: “View is clipping its content.” It is not a warning, just a message, and I assumed that it was related to the above warning until the warnings were fixed. It is a straightforward message, albeit with no reference to the specific view involved, so I looked into find the problem there as well.
As it turns out, there is a very useful tool with IB 3.2.6 to assist with this. Select ‘Layout->Show Clipping Indicators’ to enable a feature that displays a small “+” at the bottom of any view that is clipping its content. I never noticed this setting before, and it can be very handy. Alas, it also reveals (in our case) that the messages are just pointless chatter, since they are being given for list views with extra columns that are intended to scroll horizontally. Fortunately, they do not produce a warning message, so the messages are easily ignored; in fact, they only appear on the full build log, so I may have never noticed them had I not been debugging a nearby warning.
[The most meaningful comment that I received for the last post was (seriously), “I’ve a cockroach on my pillow. Wanna see it?” The days of technical development posts may be numbered.]