Showing posts with label process. Show all posts
Showing posts with label process. Show all posts

Nov 21, 2015

Cocoas First Responder, an irl investigation of terms

List of terms/sentences from an article on the Responder Chain that I don't understand yet.

- In fact even Apple often employs delegate protocols to have a view controller communicate to its superior.
-
@protocol FlipsideViewControllerDelegate

- Now we can get rid of the delegate protocol

Oh interesting.  There are 2 ways to assign the receiver for an action (like a button click).  One is to assign it to the "File's Owner".  No idea who this is yet, but sort of get the idea that it may be something called a "Controller" class.  Or something.  The other option for an action target is that you can put the action (the click) in a 'queue' of sorts, to be processed by the "Responder Chain" (whatever that is).  The chain goes up a list, sort of like the View Hierarchy in Android, until it finds a receiving method (I don't think that's what these are called but whatevs) that is registered for that action (the click!).  That method is then called.  

- Any selector can be used for the action parameter of the sendAction method 

What's a selector?  If I had to guess, I'd say that it's a view?

Since the app delegate has been promoted to a UIResponder as of iOS 5

Who's the app delegate?  This seems like the first Activity from an Android app.  Or like an Application subclass, but more easily accessible than the Application subclass is. 

Further Interface Builder questions:
There are three items listed under Placeholders: File's Owner, First Responder, and Application.  What is Application good for?
What's the difference between the Placeholders objects, and the Objects?

Mapping Learning

I'm currently writing an app for OSX.  I started it over a year ago, but when XCode ate my project, I gave up.  Before the XCode Apocalypse happened, I had a working prototype built.

In early April, while at DroidCon Montreal, someone asked me what my 'startup idea' was.  I told them about my XCode project that got eaten.  They said it was a good idea, so when I got home I tried to open XCode again.  No luck.

In early October, I was inspired by a tweet about octobuild.com to finish a project in October.  Or at least work on one.  So I opened XCode again.  It worked this time. (Huzzah).

I've been working on it, off and on, since then, just a little over a month.  The prototype no longer works, but instead I'm currently focusing my efforts on making the GUI look and work how I want it to.

I don't know Objective-C.  I've never done any OSX app programming before.  I have done .NET and a fair amount of Android programming, however.  Both of which are GUI-esque systems.  I've been having a hard time grokking how the new system (Interface builder, wtf?) works, so here's a short documentation of things I've learned so far that have been helpful for getting a footing on writing my first OSX app.

- Reading the Apple documentation.  Fairly helpful, but not the right granularity for the most part.  Either too much of a 10,000 foot view or way too granular 1ft view.
- Googling shit / searching for help on Stack Overflow.  Hard to do at the beginning because I don't know what I'm supposed to be Googling for.  What's the proper name for the text input field things?
- Doing an Apple tutorial. I found a really basic, pictoral tutorial in the Apple docs.  This was really helpful for learning the layout of XCode.  But I had mostly forgotten it a few weeks later when I went to do my own GUI.  I can't find the link to it now, either.  However, I did find this repository of sample code.
- Reading articles that are too hard for me.  This is actual a pretty decent strategy for getting a grounding in what the lay of the land is, provided you can hold the fuzzy/frustrated feeling at bay and work on building a relational map of unknown words.  Example: this article.
- Finding the right words.  I finally figured out that Cocoa is the name of the GUI system for Mac OSX applications.  I don't recall exactly what the name for the UI system is for iOS apps.  But it's not Cocoa.
- Asking friends for help. I found this to be slightly helpful, but mostly frustrating.  I asked for help via chat, and I really needed someone in person to show me what buttons to click on the Interface Builder.  Both people I asked were helpful, but neither of them were able to point me to the silver bullet for understanding Mac App programming that I was hoping for.  (One probably doesn't exist).
- Reading the Table of Contents of books.  I find this really helpful for giving the lay of the land - what topics are there to explore?  How are things called?  Sadly, I didn't think to do this until today.  Table of Contents are often available free of charge for any book listed on Amazon (or otherwise).

Something I'm considering trying:
- Buying/borrowing a book. Books are so good at starting at step A and explaining the lay of the land (which is usually what I need the most when working in a totally new paradigm/system.)


I still feel like I'm struggling because the thing that I wanted to have done is not done yet.  The reality is that I may not be moving very fast, but things are making more sense.  That's progress!  I'll take it :)

87 ways to die in brazil

There are an infinite number of ways to die. A good majority of those ways can be found in Brazil.  I was lucky enough not to directly encou...