So there I was, mucking about in Xcode, following along with an example in that book I've been studying (trying to determine why the keyboard wouldn't hide when I touched outside a text field). In the spirit of (reckless) 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 wouldn't be what I wanted, and I deleted the reference in Interface Builder, and the code it had added to the other files.
But when I ran the program, it threw an exception. Being so new to all this, I didn't think to check the log files, and when I couldn't work out what the error was (or fix it), I gave up, 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 had the good sense to have more than a passing glance 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 it anywhere.
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.
I find I'm learning the most when I'm making the most mistakes. Not so much this time, though. This was just bewildering.
30 May 2011
28 May 2011
27 May 2011
Five Days
It has been a good week. I have been able to devote all of it (well, almost all of it — today has not been adequately distraction-free) to study. I spent several pointless, but (mostly) useful hours yesterday building on one of the examples in the book I've been using, just to see if there was a way to do what I thought ought to be done. I accomplished almost everything I tried — I just couldn't get the scroll-back-to-bottom view to animate when the keyboard disappears. (For some reason this particular bit didn't have an "animate" function, and I finally had to give up trying to work around that. There are ways around the problem, and I tried several, but nothing did what I wanted.)
What I'm hoping for is to be able to understand just enough to be able to fix the (many) mistakes I make, and if not to ask the right questions, to be able to find the answers.
What I'm hoping for is to be able to understand just enough to be able to fix the (many) mistakes I make, and if not to ask the right questions, to be able to find the answers.
26 May 2011
Xcode 4
Xcode 4 was released during those few months I was idle — it's to my advantage, I suppose, that I haven't spent so much time using Xcode 3 that I've developed habits that will make it difficult to adjust to this new way of working. But I'm still new at this, still very much reliant on step-by-step instructions, and when those steps are different, it can be kinda frustrating.
And there's not really a manual — not one that I've been able to find, anyway. There's a "Transition Guide" (and I have that) but it's not much of a guide for the beginner. I found two books, but one is due out in about a month,
and the other isn't expected 'till early next year.
(It's like that with technology books, particularly in print. Difficult for them to stay current.)
I discovered one interesting feature only because I happened to read about it in a review: with Interface Builder now built-in (instead of a separate application), you can set up code and your NIB files in a split view, and drag from the NIB to the code to automagically create outlets and actions. Works great — but then you discover that when you add this stuff to your Header file, it's also adding it to your Implementation file when you weren't expecting that, which can be the cause of some confusion if you're just trying to follow directions.
And there's not really a manual — not one that I've been able to find, anyway. There's a "Transition Guide" (and I have that) but it's not much of a guide for the beginner. I found two books, but one is due out in about a month,
I discovered one interesting feature only because I happened to read about it in a review: with Interface Builder now built-in (instead of a separate application), you can set up code and your NIB files in a split view, and drag from the NIB to the code to automagically create outlets and actions. Works great — but then you discover that when you add this stuff to your Header file, it's also adding it to your Implementation file when you weren't expecting that, which can be the cause of some confusion if you're just trying to follow directions.
23 May 2011
Restart
Yes, I've been away for awhile; sorry, no I don't have the time to explain why just at this moment; and yes, I'm throwing another $50 book at the problem. This time, it's Beginning iOS 4 Application Development,
which seemed like as good a book as any to get re-started with. From a brief few hours' experience, it seems like there will be slightly less hand-holding, which might be best for me at this point.
09 February 2011
Spoons
One of the concepts I find difficult to grasp is this idea that you iterate through an enormous (relatively speaking) quantity of data to find the right place to put something, or the right something to put somewhere. To me that seems odd — like checking every drawer in the kitchen to find out where the spoons should go, rather than just knowing where they're kept. But I guess the process moves at such speeds that you're not really aware that this is happening, anyway.
27 October 2010
Stuck
I am stuck. I'm paralyzed, by not knowing where to begin (and by wanting this project to be over before I've even started it). I need to work myself up to get myself working, to get something (anything) accomplished. I know I can do this. I have a great idea. (At least, I think it's a great idea.) But I don't know how to get started.
I told myself I couldn't keep throwing $50 books at this problem (and I can't), but in looking through the information and the various tutorials I could find, I still felt hopelessly lost. So I've turned to Beginning iPhone 3 Development
with the hope that I'll find the encouragement and hand-holding I think I still need. (I almost bought iPhone Programming: The Big Nerd Ranch Guide,
instead, but it looked far too intimidating.)
I told myself I couldn't keep throwing $50 books at this problem (and I can't), but in looking through the information and the various tutorials I could find, I still felt hopelessly lost. So I've turned to Beginning iPhone 3 Development
Subscribe to:
Posts (Atom)