Objective-C Programming for Dummies by Neal Goldstein

Objective-C Programming for Dummies by Neal Goldstein

Author:Neal Goldstein [Goldstein, Neal]
Language: eng
Format: epub
Tags: Computers, Programming, Object Oriented, General
ISBN: 9781118231289
Google: KgQIB1njpg0C
Amazon: 111821398X
Publisher: For Dummies
Published: 2012-10-01T18:30:00+00:00


In Figure 8-9, you can see that the Breakpoint button to the left of the Activity view has inverted. This lets you know that you have at least one breakpoint set. If you click that button, it temporarily turns off all breakpoints (if you think you fixed something and want to see how your program runs without all those pesky breakpoints).

When I build and run the program again (as you can see in the Editor window in Figure 8-10), the program has stopped executing right at the breakpoint I set.

You can see the source code around the breakpoint where the Debugger has halted in the Editor area. You can also see in the stack pane on the left that you went from main to [Budget spendDollars:]. In the Variables pane, you can see that I clicked the disclosure triangle next to the self variable. Under self are the object’s instance variables. (I want to remind you, as I explain in Chapter 6, that self is the “hidden” argument in every message and is a pointer to the object’s instance variables.) You can see that the exchangeRate is 1.25, as it should be, and budget is 1000, as you would expect before the first transaction. You can also see the dollars argument, which is the NSNumber object I created. If you had any local variables, you would have also seen them as you did in Figure 8-8.

Figure 8-10: Stopping at a breakpoint.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.