Sure enough, I had to give up on that brilliant idea of color table entries. After having put all of the work into implementing it, it just looked stoopid. But I'd have probably wanted to move the contents of the table into a .plist file, anyway, so it's not as though the work was all for naught.
03 July 2011
Unintended fun with Xcode 4.
I was working on a project, when something went very wrong -- in retrospect, I'm not sure it was even an error that I had introduced -- and once again, I had to restore my project files from a back-up.
I tried restoring the project files from three different sources, all, inexplicably, with the same errors! -- before I realized that the problem seemed to be that I was opening them from the same location as the project that had gone wrong (having copied over the project folders). When I opened those files from other locations, there were no errors.
Eventually, I chose to rename the project folder, and that solved the problem. (Who knows -- that might even have solved the problem with the original project files, as well.) Later on I was able to restore the original folder name, and while the error messages came up again, briefly, the project did build successfully.
I don't understand why Xcode seems so completely and utterly dependent on file locations. (At one point I had tried to reorganize some files outside of the program, just putting them in folders, but relinking to them proved to be so much trouble that I gave up on the whole idea.)
I tried restoring the project files from three different sources, all, inexplicably, with the same errors! -- before I realized that the problem seemed to be that I was opening them from the same location as the project that had gone wrong (having copied over the project folders). When I opened those files from other locations, there were no errors.
Eventually, I chose to rename the project folder, and that solved the problem. (Who knows -- that might even have solved the problem with the original project files, as well.) Later on I was able to restore the original folder name, and while the error messages came up again, briefly, the project did build successfully.
I don't understand why Xcode seems so completely and utterly dependent on file locations. (At one point I had tried to reorganize some files outside of the program, just putting them in folders, but relinking to them proved to be so much trouble that I gave up on the whole idea.)
02 July 2011
Debugging
I had set up UIModalTransitionStylePartialCurl as a sort of detail view, but without an explicit way to dismiss it, because just touching the screen seemed enough. But with iOS 5 (NDA, I know, I know -- but really, who reads this?), it just does -- nothing. It just sits there if you don't set up a method to dismiss it.
In the process of implementing one (a big ol' invisible full-screen button), I discovered that the page curl responds to the position of the button, so I can exercise some control over the result. The smaller the button, the smaller the size of the view that's revealed.
In the process of implementing one (a big ol' invisible full-screen button), I discovered that the page curl responds to the position of the button, so I can exercise some control over the result. The smaller the button, the smaller the size of the view that's revealed.
29 June 2011
Complicated
...And it gets ever more complicated, as I discover there might just be a way to have each of a series of table entries rendered in different text colors. (I only hope after all the time I put into implementing this that I still end up using it.)
Developing
I had wanted to document my development process, but I've been so deep into it that it's been difficult to find the time to write about it. That, and because of my relative inexperience, even the basic, simple stuff has taken twice as long as it probably should. But I have been making progress.
I started out with (what I thought was) a reasonably simple, reasonably basic idea -- and promptly filled four or five sketchbook pages (maybe six) with ideas as to how it might be implemented, first on the iPhone, and then on the iPad. I decided to start with the iPad version.
In the end, it's taken about two weeks, off and on. I'm not finished yet, but I'm getting there. And I've learned a lot. Part of the delay has been in going back in and reworking code (and reworking it again) as I've discovered there was a better way. Lots of time has been spent implementing additional features and mechanisms and whatnot I didn't know I'd need 'till I had a working prototype. And then, there's the fine-tuning and attention-to-detail stuff that I just can't let pass.
When all is said and done, it will probably have taken much more time than will ever be returned in sales. But I had to start somewhere, even if somewhere quickly became much more complicated than I had anticipated.
I started out with (what I thought was) a reasonably simple, reasonably basic idea -- and promptly filled four or five sketchbook pages (maybe six) with ideas as to how it might be implemented, first on the iPhone, and then on the iPad. I decided to start with the iPad version.
In the end, it's taken about two weeks, off and on. I'm not finished yet, but I'm getting there. And I've learned a lot. Part of the delay has been in going back in and reworking code (and reworking it again) as I've discovered there was a better way. Lots of time has been spent implementing additional features and mechanisms and whatnot I didn't know I'd need 'till I had a working prototype. And then, there's the fine-tuning and attention-to-detail stuff that I just can't let pass.
When all is said and done, it will probably have taken much more time than will ever be returned in sales. But I had to start somewhere, even if somewhere quickly became much more complicated than I had anticipated.
14 June 2011
Unproductive
I had better things to do today than deal with the ill effects of a corrupted font cache.
09 June 2011
The Accidental Fart App
Now I understand this mania for fart apps -- they're so easy to create, even for the relative novice. (Well, that, and they appeal to the eight-year-old in us.) I didn't set out to make one, I really didn't, but after completing a second project -- which I'm going to remain quiet about, for the time being, as the basic idea might prove useful for a real product -- my eight-year-old specifically asked for one, and gave me glorious details of what it ought to look like.
While I did not implement his ideas for what it ought to look like (to keep it in reasonably good taste), I did create his fart app. I even added some additional non-fart sounds, just to make it more interesting.
I'm now looking forward to creating apps for more than just one eight-year-old. (Two if you count me.)
While I did not implement his ideas for what it ought to look like (to keep it in reasonably good taste), I did create his fart app. I even added some additional non-fart sounds, just to make it more interesting.
I'm now looking forward to creating apps for more than just one eight-year-old. (Two if you count me.)
06 June 2011
First Impressions from the WWDC Keynote
Might be best to think twice before spending the time to develop (to say nothing of building a business around) something that Apple is bound to add to iOS, sooner or later. Like, let's say, a full-featured Chat client.
But then again, perhaps you can't always be that confident. One of my absolute favorite cannot-live-without aspects of the iOS platform is Instapaper, and now Apple will be building that functionality in, to a certain degree. I love the app, it's not an exaggeration to say I use it every day, and the developer seems swell, and I feel badly for him by proxy. (This was not entirely a surprise — it's been lurking in the Lion beta, and I suppose it's an obvious addition to the iOS, as well — but still.)
Developer beta of iOS 5 today -- for Developers. And I'm a developer! (Paid for and everything.)
I've spent some time reading the developer documentation. (I think I understand some of it, at least.) It's — interesting, this feeling of trying to learn from a moving target. Not just the new stuff, it's the changes in the behavior of current classes that worry me. I had a similar experience when one of the first books I read was built around iOS 3, when 4 had already introduced all sorts of changes (which led to the occasional problem with the sample code). I have an unsettled feeling by the time I'm comfortable with iOS 5, something else will have superseded it. Gotta start somewhere, though.
But then again, perhaps you can't always be that confident. One of my absolute favorite cannot-live-without aspects of the iOS platform is Instapaper, and now Apple will be building that functionality in, to a certain degree. I love the app, it's not an exaggeration to say I use it every day, and the developer seems swell, and I feel badly for him by proxy. (This was not entirely a surprise — it's been lurking in the Lion beta, and I suppose it's an obvious addition to the iOS, as well — but still.)
Developer beta of iOS 5 today -- for Developers. And I'm a developer! (Paid for and everything.)
I've spent some time reading the developer documentation. (I think I understand some of it, at least.) It's — interesting, this feeling of trying to learn from a moving target. Not just the new stuff, it's the changes in the behavior of current classes that worry me. I had a similar experience when one of the first books I read was built around iOS 3, when 4 had already introduced all sorts of changes (which led to the occasional problem with the sample code). I have an unsettled feeling by the time I'm comfortable with iOS 5, something else will have superseded it. Gotta start somewhere, though.
31 May 2011
Deployed
I uploaded my very first project to an actual, real device this afternoon. Geez, Apple sure doesn't make that process easy (the guided Assistant on the web site wasn't much help, either), but with the wisdom of a book, I was able to get everything working.
Of course, nobody else is as impressed with this feat as I am, since nobody else knows what kind of hassle you have go through — and it's not much of an App to begin with (all I did was modify the sample project I was buiding from another book). My son, pictured (his face bounces around the screen), was bored with it by the third time I showed it to him. Oh, well.
Of course, nobody else is as impressed with this feat as I am, since nobody else knows what kind of hassle you have go through — and it's not much of an App to begin with (all I did was modify the sample project I was buiding from another book). My son, pictured (his face bounces around the screen), was bored with it by the third time I showed it to him. Oh, well.
30 May 2011
Exception
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.
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.
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, 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.
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.
Subscribe to:
Posts (Atom)