Interface Builder gives me a warning about the set up of my .xib file.
It says, in a dialog called "MainMenu.xib Info",
Object: Window
ID: 21
Type: Illegal Configuration
Issue: 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.
I'm using XCode Version 3.1.2 and Interface Builder version 3.1.2 (677). I verified that I could recreate the issue by creating a new Core Data Application and opening the .xib file. Also interesting is that when I open the .xib file, the main window does not display right away (as it does with other templates), but will come up when I double-click on its representation in the window with the File's Owner, First Responder, etc. It has nothing visible in it (it does have a Content View inside it), and the Inspector shows the size as 213 x 107 (px?).
I see that there is a 3.1.3 version out now, and it does look like a bug in either Interface Builder or the template for a Core Data Application, but, is there any way for me to fix this? Resizing the window doesn't help, and it is not at all clear to me under what conditions the errors and warnings come up (ie. if I have to compile, or if they change just as soon as I adjust the UI.)
Easily fixed.
In Interface builder select the window and then from the inspector go to the window size tab and move the window away from the left edge. This will get rid of the warning.
Related
I am developing an extension on Firefox's Addon SDK (v1.10).
My extension has a toolbarbutton that updates a small badge to its left based on the contents of the active tab.
Problem
When there is more than one window open, the toolbarbutton gets updated to the value of the active tab, regardless of whether or not it is on the same window. This means that the non active window's toolbarbutton is getting updated with data coming from a different window.
Having access to the tab object from where the data comes from, is there a way to identify the window object the tab is attached to?
It would be the opposite of this method described here.
Looking at the SDK source code (namely packages/api-utils/lib/tabs/tab.js), a tab object actually has a window property. I tested it and this works indeed:
console.log(require("tabs").activeTab.window.title);
Not sure why this property isn't documented, probably a documentation bug.
Would this be the active window? You can get a window object for the current active window using
windows.browserWindows.activeWindow
Docs: https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/windows.html#browserWindows
The window object has a list of tabs currently open in it:
https://addons.mozilla.org/en-US/developers/docs/sdk/latest/packages/addon-kit/windows.html#tabs
If you need to find a tab in a window that isn't the current active tab or window, that might be more difficult to determine. Can you provide more detail about what you're actually trying to do?
Before I used to open the inspector window ( Segmented Control Attributes) like:
Now that I upgrated to Xcode 4.0.2 I have this:
How could I open the Inspector window in Xcode 4.0.2?
I think the problem might be that you've hidden the Utilities view. To re-enable this, simply click on the rightmost of the "View" icons in the main window, as shown below.
Incidentally, if you just single click on the .xib file, it'll open in the main view rather than a new window, which is probably more useful in this instance.
I am using Interface Builder to work on NIBs and one of the NIBs must have a view on my external monitor which is not attached because I cannot see it on my MacBook. I have had this problem with editing iPad NIBs which I work on with my larger external monitor.
For some reason Interface Builder is not detecting that there is now just one screen and not pulling this view onto this monitor. There has to be a way to get this back into the visible space so that I can work on it. I have tried double clicking on the view icon in the organizer which normally brings the view forward but it is not coming into view.
What can I do? Is this really a bug that has been around this whole time?
I was seeing this problem as well -- the easiest way to fix it is:
In Interface Builder, double-click on the view object. This would ordinarily bring up the window and give it focus, but in this case it's invisible.
Hit Cmd-W to "close" the invisible window
Double-click the view object again; the window should now re-open onscreen.
Yes - it messes up this way when a XIB is created on a computer with multiple monitors but then later edited on different computer with just one.
To my knowledge the only way to fix is to to open the XIB with a text, or ideally XML, editor and search for negative values in various positioning strings. I've searched for {{-and then changed any negative values found to 0. For example, you'll run across {{-237,172}} When you find the open brace, open brace, minus sign pattern then change the negative value to a zero. i.e. {{-237,172}} becomes {{0,172}}.
When you re-open the XIB in IB you'll then be able to see your views.
To be safe make a copy of the XIB before hand editing.
Try using Exposé to see if the window shows up there. Ordinarily you can use Window > Arrange in Front to rearrange your windows, but it seems the non-document windows in IB don't obey ordinary Cocoa window handling so this command has no effect on them.
I wasn't able to reproduce it myself (when I disconnected my 2nd monitor, the window on it moved to my main monitor), but it may have something to do with the arrangement of your screens. If this turns out to be an IB bug you can reproduce, please file it (bugreport.apple.com).
Not sure if this will work, but open the window from your xib (double-click it) in Interface builder, then go to the "Window Size" section of the inspector. 2 Places might help in there, first the "Initial Position" shows a representation of the window and you might be able to just drag it back to the proper place. Second is "Content Frame". There are "X and Y" settings so try changing them to 0 and see if that does it.
<object class="NSMutableArray" key="dict.values">
<bool key="EncodedWithXMLCoder">YES</bool>
<string>WhatEverYouNamedIT</string>
<string>UIResponder</string>
<string>{{237, 644}, {320, 480}}</string>
<string>com.apple.InterfaceBuilder.IBCocoaTouchPlugin</string>
</object
I opened the .xib file with Dashcode and changed the {{237, 644} to {{0, 172} saved and opened with IB and the view "canvas" windows was back on my laptop screen everything else opened up on my external monitor.
THANKS!!!
I recently updated to xcode 3.2.2 yet now when I click my .xib files, I can't see the view window where I can drag/drop stuff, I only see the inspector panes and can't get the design view to show
Double-click the view in the xib object viewer (normally this would cause the view to appear and become active) and you will see the object viewer lose focus. Press CMD+W (to close the invisible view) and then double-click to open it again. It should appear on your screen now.
A warning comes up in a MainMenu.XIB dialogue box. It says:
Object: window(window)
ID: 371
Type: Illegal Configuration
Issue: This windows 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.
I saw something related to this issue on StackOverflow, but it did not help. Here was the prior response:
In Interface builder select the window and then from the inspector go to the window size tab and move the window away from the left edge. This will get rid of the warning.
Select window by it's title bar.
Open sizing and positioning tab (⌘+⌥+ 5 in Xcode4 and Xcode5) in inspector panel.
Adjust it's position on the desktop so that it is somewhere in the middle of it.
I had the same problem with Xcode 4.5.2
What I ended up doing is also clicking on the window's title bar -> "Show the size inspector" tab.
Then I just toggled the struts & springs in the preview area. Without really changing anything other than toggling on/off.
None of the above worked for me.
For me it seems that my MainWindow's width was too large. I found that at a 1024 it quit giving me the warning!