Storyboard file missing - xcode4

I'm new to xCode 4 and have playing with storyboards for most of the day. I was making an edit to one of the segue's and didn't realize that the entire file was selected, not just the arrow on the right side. This deleted my ENTIRE storyboard, which usually isn't a big deal as it's either still in the folder if i only deleted the reference, or in the trash if the file was actually deleted.
Strangely, it's in neither. I created a storyboard to test this out and sure enough, xCode warns "this can not be undone"....and it's gone. No where in finder or the trash bin.
Now, the weirdest part. My application is still running fine. I can't make any edits obviously as i can't bring it up, but xCode is still running fine. I've reset my computer and done everything else to clear it out but i can't my storyboard nor find it anywhere!
any help would be greatly appreciated...
jason

This happened to me as well - very alarming! However I searched for "storyboard" using SearchLight on the desktop. This found the file as the top hit! I was then able to track its location to a folder called en.lproj within the project folder and use File > Add to bring this folder back in.
Everything seemed fined except I had a problem every time I tried to delete the same image that caused the problem in the first place. The image was just sitting in a viewcontroller as a background image and each time I deleted it the whole storyboard vanished (temporarily).
So, I simply removed this viewcontroller altogether and created a new one and that worked. Much better than recreating the whole storyboard!

Related

Icons behaving weirdly

I made an application with Visual Studio 2019. I already set an icon for it, but then I wanted to change it. When I changed the icon, in some folders where I had the program saved with the old icon, the displayed icon didn't change when in replaced the file. The program only contains one icon file. I even tried redoing the program by deleting the vs project and copying my code. After that didn't work, I tried changing the icon back but now in every folder that once contained the file while it had the newer icon, the file wouldn't change back. Renaming the file doesn't work either. I have never seen this before. Can anyone help?
So, it went away by itself. If you ever have this problem, it will probably go away on its own. Don't exactly know how long it takes, restart is not enough. It took only one day in my case.

Silverstripe image moving from one folder to another freezes screen and no operations can be performed after that

I am using Silverstripe 3.0 and everything is running fine. Suddenly I faced an issue while moving images from one folder to another from admin/assets section.
In this section when we click on the folder it takes us inside the folder and shows all the images inside that in grid view. When we click on any image then it takes us to the image details page (for example admin/assets/EditForm/field/File/item/1917/edit) where we have the details of the image such as File name, Title, Owner and a drop down Folder which shows the folder in which the image is located.
When I change the folder from the drop down and want to move the image to selected folder, then during the process the screen freezes and none of the actions happen though in console all the ajax calls can be seen working and no error in console. Once I refresh the page then all the things work normal and the image which I moved to other folder is there in other folder.
Any help or Idea where I can look for the issue ??
Your question is quite explanatory but it is not possible to give a perfect solution to your answer. As a guess I can say that you have some issue with redirection in your code in framework/forms/gridfield/GridFieldDetailForm.php page.
As you said you are using 3.0 so I have tested this issue in 3.15 and found that there is no such issue. I would suggest you to replace the old file with this new one in Silverstripe 3.15 and see if that works. If it does work than you can compare these two files and pin point the cause of the issue.
But always remember to take a backup first and then do such thing.
Cheers.

xib file save doesn't stay saved in Xcode

I made some changes to my MainWindow.xib in Xcode and every time I hit save it appears to indicate success, changing from dimmed to normal in the navigator. Seconds later it goes back to dimmed, as if it has been modified and needs to be saved again. Has anybody seen this before? What do I do to make it stay saved.
I have tried deleting the derived data and reopening the project. The changes do appear to remain as edited, the project compiles and seems to work properly. Only sign of an issue is that the file looks to need saving no matter what I do.
On further analysis I found that it seems to change to modified state whenever I select it, whether I make a change or not. I can't say if this is normal behavior but it does not seem to result in any problems for my project. If I select a different file in the navigator pane, prior to a build, the xib file is saved and stays saved. If I select the xib again after that build, it instantly goes back to modified.
This does not happen with any other xib files in my project.
I have never noticed this behavior prior to now, of course it has been ages since I altered this specific xib.
I am going to conclude that this was a bug in a former XCode build. Since latest, now 4.4, I have not seen this behavior at all.

XCode: The document: "<document name>" could not be saved. The file has been changed by another application"

Since starting to use XCode 4.2 I've more-or-less routinely had the error:
with various substitutions for the filename. This is normally when Xcode is doing an autosave, so it happens seemingly at random. I generally click "Save Anyway" and my recent edits are then preserved, although there is a significant probability that Xcode will then hang. I don't typically lose much when it hangs, other than a minute to shoot it and get it to restart, but still...
I don't open any of these files in any application except XCode. I have not been able to figure out the pattern, although it may have to do with popping back and forth between files. The last time I noticed it, I also noticed that the previous round of edits to that file hadn't taken. So some other editor had not saved the file.
Enough preamble: here's the question:
Are others running into this? Has anyone narrowed down what causes it? Is there a setting I can change to prevent it? Is there something I can change in my behaviour?
You will get this happening when
1) There are locally unsaved modifications (the navigator icon will be shaded)
2) AND something else has changed the file outside of Xcode. For me this occurs when I do an external update from svn on the command line or via Versions
What do you have that is modifying and saving the file outside of Xcode? Anything?
Check your source control (if any) and figure out if something you are doing is causing the conditions to be met.
Well I had the same problem when I was trying to Localize my files. Then I noticed that every time the message was popping up was because the icon of the selected file in the Project Navigator was grey, which means that was not saved. So what I did was to save the file (Cmd+S) before doing the action that made the "changed by another application" message to appear, in my case the Localize button.

Strange Error in Xcode 4 that persisted across different versions of the same file

I want to preface this question by admitting that I'm still very much a novice, to Xcode 4 and to development in general. But I find I learn the most when I've made mistakes and been able to discover ways to correct my errors.
So I was mucking about in Xcode, following an example in the book I've been studying, in this case trying to determine why the keyboard wouldn't hide when I touched outside a text field. In the process of experimentation, I tried adding an Outlet to the top level View of a View Controller, dragging into the Header file to automagically create it. I knew almost at once this wasn't what I wanted, and I deleted the reference in Interface Builder, and the code it had added to the other files.
And when I did run the program, it threw an exception. Being new to this, I didn't think to check the log files, and when I couldn't work out what the error was, I restored an earlier version of the project from Time Machine, and tried again -- same result. I restored an even earlier version and tried again -- and got the same error!
When I finally did have the good sense to look at the log file, I noticed the reference to the name of the Outlet I had added, but removed! But these were older versions of the code, before I'd even made that change.
I made a thorough search of the code, and my NIB file, looking for any reference to the deleted Outlet. I couldn't find anything.
I eventually replaced the NIB file with a version from the tutorial from the book I was following (it was identical, and easier than rebuilding it from the bottom up), and all was well, everything ran just fine. But now I'm left wondering -- what could I have done to make this error so persistent, across different versions of the file? I'm already kinda uncertain about the way Xcode 4 will automagically add code under certain circumstances (that's probably more dangerous than useful for the novice), and I wonder if this is a bug in Xcode 4, or if I inadvertently tripped over a useful feature.
Xcode loves to play tricks on you. I've several times gotten an XIB mysteriously hosed up to the point where I had to delete it and start over. No matter what I'd do to the XIB some elements wouldn't display correctly (or at all).
In a recent case I had an XIB with a label with the text "Start date:". I changed that label text to "Treatment date:", but it still kept coming out "Start date:". I opened the XIB as text and scanned for "Start date:" and it wasn't there. So I tried dragging the label off to one side. Then it displayed the correct words. Dragged the label back to the correct place -- back to "Start date:". I finally deleted the label and recreated it and then the text came out correctly.

Resources