Symmetric
Symmetric

Reputation: 4031

Xcode menu item Editor / Add Model Version... missing

Every once in a while I try to add a new data model version, and the menu item is missing. It seems the Editor menu is supposed to change depending on the file selected, and this sometimes doesn't happen. It the past I've randomly clicked, cleaned, built, etc. and eventually it showed up again with me not knowing what happened. Today it seems restarting Xcode fixed it, but I don't know if that will always work. Below are two screen shots, the first showing the wrong menu, and the second showing the correct menu. My data model is selected in both cases. Has anyone else seen this? Is it a bug, or is there some setting or selection I'm missing? enter image description here enter image description here

Upvotes: 2

Views: 4745

Answers (2)

Matthias Bauch
Matthias Bauch

Reputation: 90117

From the color of that file navigator bar I can see that you did not select the datamodel file. You probably were in "Assistant Editor"-Mode and had a .h or .m file on the right side. The active cursor was in the right file too.

The selected file shows a darker shade of gray:

enter image description here

The not selected file uses a lighter shade of gray:

enter image description here

It's important to know that the file selection highlight in the left side bar does not change when you select a different file without using the side bar. Don't trust the sidebar when you are editing files.

Click into the data model file first and your menu will be like you expect it.

Upvotes: 6

theMikeSwan
theMikeSwan

Reputation: 4729

Unless your are selecting the menu super fast after selecting the file (possibly not giving Xcode time to swap it out) then I say file a bug report http://bugreporter.apple.com

You should give Xcode a few moments to swap the menu out though to determine what kind of bug it is, if it doesn't swap out after 60 seconds or so then it likely isn't just a performance issue). Make sure to include a system profile as I just checked on my and every time I switched to a data model it changed the menu accordingly.

Does the same thing ever happen with xib files? Any other file types you use that sometimes have different menus?

Upvotes: 0

Related Questions