I've worked on a few projects now, and I've had to change the framework search paths, set the bundle loader, etc.
But I've never felt totally comfortable with that Project (or Target) "Get Info" window. I still don't know what half the stuff in there is, and whenever I change anything, there's always a bit of finger-crossing when I click Build. Building and linking all feels a little "magical" to me right now.
I assume this feeling isn't normal. Does anyone know of any good tutorials for these non-code-related parts of building an app?
When you select a build setting, Xcode 4 will show a short description in its Quick Help, which is in one of the Inspectors you can show on the right side of the window.
In Xcode 3, the description will appear at the bottom of the Info window that tells you what the setting does. In even older versions, click on the stack of books with the pair of spectacles on top.
If you're still stumped and the setting in question corresponds to a GCC option, you can look it up in the GCC manual. If it doesn't correspond to a GCC option, Google it.
All (as far as I can tell) of the build settings are documented in the Xcode Build Setting Reference, although some of these are more useful as output (e.g., environment to a shell script phase) than as input (actual settings). Indeed, a few of them, such as ACTION, only appear as output; you can't set them in the Info window, and wouldn't want to.
Related
In Windows 10, everything works perfectly in the Livecode editor (64 bit). However, after building/compiling, ask and answer dialogs are hidden or behind other items in the stack and do not show.
How can I fix this? I need answer and ask dialogs to appear like they should. I tried 32 bit - same problem.
I can't seem to find anything in the build options that would fix this.
Thank you for any help.
Mike
It is possible that the ask and answer dialog assets are not being included in the build. Try this:
Open the Standalone Application Settings from the File menu.
Go to the General tab.
Click the radio button "Select inclusions for the standalone application".
Go to the Inclusions tab.
Scroll down until you find the Answer Dialog and Ask Dialog options, and check those.
Re-build your project and see if that solves the problem. Please note that if you choose to select inclusions manually you will have to check all of the libraries, widgets, and other assets that you are using in the stack.
When the "Search for required inclusions" option is chosen in the General tab, the Standalone Application Builder is supposed to scan the stack contents and include everything that's needed automatically. But it doesn't always catch everything, so many experienced LiveCode developers always do this step manually.
I am attempting to debug my project in GNAT's GPS IDE. Every time I chose Debug->Initialize->"program name" the gui of GPS switches to that of the debug GUI, and then an error pops up with "could not initialize the debugger".
The two possible solutions I have found are that gdb.exe may be out of date and it suggests running it outside of GPS, which it does run fine. The other possible solution is to make sure the -g tags are applied when building the project, as those are necessary for gnatlink and gcc for debugging. It also states that the -g tag is applied to a new project by default, unless you have specifically removed it. I doubt I have, but I am not sure where I would check that to make sure it is still included.
The other odd thing is that the tutorial that comes with GPS that runs through how to build and debug your code works perfectly fine when I initialize debugging on it. That tutorial I am referring to can be accessed through Help->GPS->GNAT Programming Studio Tutorial. It references the program 'sdc' which comes in the GNAT/2012/share/examples/gps/tutorial directory.
Any ideas on what I am doing incorrectly, since the error isnt very helpful?
Thanks!
At first it sorta sounds like a path problem, but if you're able to run a debugger tutorial that's probably not the case.
The behavior you're seeing if the program isn't compiled with the debug (-g) flag doesn't quite match my experience, but let's go ahead and check/set the debug flag anyway.
Select Project/Edit Project_Properties
Click the Switches tab.
Click the Gnatmake tab.
Check "Debug information". Note that a -g now shows up in the text box at the bottom of the tab page. Click OK on the dialog.
Recompile your code so that it uses the changed option. Select Build/Clean/Clean All, and OK any dialog that pops up.
Then do your build (you can just press F4).
I have seen this icon on Xcode 4.5 whenever I run a project. I have also seen this possibly on older versions of Xcode also, though I can't remember distinctly.
What could this possibly mean?
EDIT: The image was not previously loaded, have uploaded it now
EDIT 2: I wanted to know about the number 3 which is coming in the left side of the image. I understand the "114" denotes the warnings". Apologies for the ambiguous explanation in the question before.
It means you have warnings.
In this case you have 114 compiler warnings!
Click on it and you'll be taken to the correct tab in the project explorer where you can start working on correcting them.
As for the number 3, again, click on it - it shows you the number of tasks it is running.
Just try clicking on things in Xcode, you'll find a lot more information about it that way.
I'm just starting out with Cocoa development in Xcode, doing the hello world example. I'm up to step 6 of the section "runtime debugging", which is
Using the Step Over button in the debugger toolbar, begin stepping through the code. As each line of code executes, you can examine the program’s state. The value of a variable is sometimes drawn in red to indicate that the value was modified in the last step.
Notice that the debugger pauses before executing the indicated line. After each pause, you can add additional breakpoints or choose Debug > Restart to terminate the application and start a new debugging session.
now what I've been pulling my hair out for over the last hour is the fact that this debugger will only show me assembly code. I can manually select my source code file, but as soon as I click "Step over" I'm right back in assembler view. I can't for the life of me figure out how to turn the assembler off, and make it show me my source code!
I know this article is a hundred years old, but in case anyone is wondering how to address this issue in more recent Xcode versions (as opposed to Xcode 3), you'll find the appropriate setting labeled Always Show Disassembly under Debug>Debug Workflow in Xcode 6 and up. Ensure the option is NOT checked.
In Xcode 5, the option was labeled Show Disassembly When Debugging under Debug>Debug Workflow. Ensure that "Show Disassembly When Debugging" is unchecked.
Back in Xcode 4, the Show Disassembly When Debugging setting was found under Product>Debug Workflow. Again, ensure that the option remains unchecked.
This was driving me crazy, too.
NOTE: The information above is still valid for Xcode 14+. I've applied updates to this answer as new versions of Xcode have been released. Fortunately, the option has remained unchanged since Xcode 6 (so far).
There are two other things to make sure of:
That you're looking at one of your own functions/methods. If the stack frame you're looking at is a function or method from one of the frameworks, you're going to see assembly no matter how you have Xcode configured.
That you are running a Debug build. Strip debug symbols (as in a Release build), and you'll be looking at assembly even for your own code, no matter what.
I actually figured this out before I posted, but I wanted to save others potential future headaches, (and also in case I forget later) as I could not find the answer to this by searching stack overflow, but I did find that I'm not alone.
From the run menu, select "Debugger Display" > "Source Only", or "Debugger Display" > "Source and Disassembly"
Xcode 3.2 has implemented cursor-level history for the "Go Forward", "Go Backward" commands. Previously these worked at the file level, so you could navigate back and forth through recent files you've been editing. Now they navigate at a more fine-grained level, through the places within files where you have been editing.
The downside to this is if you navigate backwards through the files and make a minor edit, all of your forward history is wiped out, whereas in the past it used to be easy to return to the file you were working on. It also means issuing a lot more commands if you just want to move through files, since you have to skip through all the edit points within each file.
I can't find anything in the release notes or documentation about this new behavior, so does anyone know if it's possible to get the old 'go back/forward by file' commands in 3.2? If not, does anyone have any tips on other ways of easily navigating recent files in Xcode?
Hold down the option key while you click the forward/backward arrows at the top of the code view, this will use the Xcode 3.0 behavior and go back a file at a time.
I had the same question as well and and Rob's answer on holding Option while clicking the forward/backward arrows works well.
I needed a keyboard shortcut though and I've found that Shift-Option-Cmd-left/right works.
From the comments on this blog entry:
Hold down the Option key to get the old file-based Go Forward/Go Back behavior. We rarely change established behavior like this when adding new options, but in this case, the majority of users considered file-level navigation Broken and location-based navigation Correct, based on their experience in browsers and other IDEs. We chose to give what more people considered the “obvious” behavior the pride of place on the keyboard shortcut, but the old way is still there.
-- Chris Espinosa
But like you guys have said, after every keyboard edit, the forward file history is lost. This is incredibly frustrating to me, as this is a feature I have heavily relied on for years, which is now broken. Is there still no fix?
There are Next File and Previous File commands, however their history is also wiped out after an edit. That seems like a bug to me.
This is plain stupid! What's the reason for suddenly change this ? Shift-Option-Cmd-left/right... great, more stupid shortcuts from Apple. I guess I soon have to use Shift-Option-Cmd-Left-Alt-Enter-N for something I use all the time. Can't they just implement a recent file list on ctrl-tab or something, like the Cmd-tab and the app switcher. Why would I want to grab for the mouse when I'm coding ? Still I have to use it lots in Xcode.
Sorry for my rant :)