Where’s the Click?

Okay, I have pinpointed my source of confusion in completing the Rectangle project for iOS class.

If this assignment were slightly different, if instead of having the triggering event be a shake but a button click, I would be able to conceptualize this. When you create a button object, you can create a method called IBAction to do something when the button is clicked. So I would create a method that instantiates a rectangle with random parameters to be triggered when the IBAction gets called when the button is clicked.

So where is the click? I know that the phone registering that is being shaken is also an action, but as of this moment I am not aware of there being a specific method that is called when this event is triggered. I think there are a series of methods that get called, but when I look at them I feel like I don’t understand what it is that they are doing precisely.

So I have isolated the source of my confusion. Now I need to switch mental gears and work on my Java project.

Onward and upward.

The Emperor has no Code

So, as I mentioned in my first post, I attended my first professional conference this past weekend, Snow*Mobile. It was glorious! I was awake and out of the house from 5:30 in the morning to 11:00 at night on Friday seeing lots of cool things and talking to a bunch of amazing people.

But, as my mother says, when you dance you have to pay the fiddler. I spent all my time and energy doing that last week and I am behind on my homework. I did not look at the assignment that was due yesterday until about six hours before it was due.

I worked on it but I was horribly confused. The assignment is to create an iOS app that makes a random rectangle on the screen. The rectangle’s size, color, and position need to be random.

I approached this like it was a Java project. I understood the principle behind what is going on. I need to create a rectangle class that defines a rectangle which has random properties attached to its size, color, and position and then I have to instantiate an instance of this every time the device shakes.

But then I got lost. Where does this get called? I can make a class that does these things, but where does it go? Am I fundamentally not realizing some large chunk of information?

So I go to class not done, but determined to figure out what I did wrong. I am sitting in the hall waiting for Eric the teacher to come. I look around me and everyone is on their Apple laptops.

I don’t say anything because I don’t want anyone to know I didn’t figure it out. I feel miserable and stupid and contemplate my existence on this planet.

Then, suddenly, I hear a whisper down the hallway, “…Hey, did anyone get this to work?”

“No.”

“No.”

“Trying to get it working right now…”

This instantly makes me feel better. I am not abnormally dumb! Other people are having trouble too!

It turns out we all did the exact same thing wrong. We all started with an empty project and we were supposed to open a single view application. I know we could have added the view later, but we are all still starting out and it was enough of a stumbling block that we all got tripped up.

I pleaded for more time on the project because I spent all my free time at the conference. This is the only reason that will fly with Eric, so I have a reprieve.

I have until tomorrow to get this working. I supposed I should work on it instead of updating my blog…

I am rolling the problem over in my head and letting my thoughts percolate. I am not procrastinating. Not really.

…Maybe a little.