Tuesday, July 7, 2009

Lecture 2 ... again!

OK, so I've been distracted from my Apple / Mac / Cocoa / iPhone programming education with this pesky thing called "A JOB" :-)

(Actually I really like my job)

Anyway, tonight I climbed back into the saddle and began refamiliarizing myself with the things I had already learned several weeks back.

Tonight I reviewed lecture 2.

Still getting used to the Objective-C syntax. It is not difficult but it feels rather wordy.

NSString *phrase = @"Mr. Javapda...but you can call me javapda :-)";
NSLog( [ NSString stringWithFormat:@"Phrase: %@", phrase ] );

Lots of learning...but sadly there are some fundamental development issues I have yet to tackle such as:
How to specify the framework(s) being used in the XCode environment.

I am still pretty excited about iPhone OS3 ...

Last week I picked up a new iPhone 3GS - so naturally I am excited about getting some software written for it.

Stay tuned :-)

Sunday, July 5, 2009

Java has Method Reflection, Cocoa has Introspection and dynamic messaging with Selectors....

Cocoa supports something call Selectors

// SEL is a type
// Here we create an instance of sell representing 'someMethod'
SEL sel = @selector(someMethod:)

// See if some object responds to this
if ( [obj respondsToSelector:sel] ) {
// Now invoke the selector (the method, if you will)
[obj performSelector:sel withObject:self]
}

Applet Tablet in early 2010?


Applet Tablet?

Objective C has Dynamic Typing

Commonly:

NSString *charlieBrownAuthor = @"Charles Schultz";
NSLog(charlieBrownAuthor);



But Dynamically:

id nm = @"Funky Chicken";
NSLog(nm);


Apparently all type checking is done at compile time. (not run time)

Friday, July 3, 2009

XCode


Learning about the XCode development environment for Mac OS X has been an interesting process.

I currently have XCode Version 3.1.2

There is a lot to learn. Tons of configuration capabilities that give the environment a lot of power...and a lot of complexity.

Coming from the Eclipse/Java world it is clear that we're not in Kansas any more :-)

One thing that I find interesting is the search mechanism in XCode. It is tightly bound to Mac OS X's Spotlight feature. So if you need to search for something it must be on a drive that has been indexed by Spotlight. If it is on a mounted drive you'll want to let Spotlight know about it by using the mdutil utility:


> sudo mdutil -i on /Volumes/<volume_name>

Thursday, July 2, 2009

Tethering your iPhone







http://www.gadgetreview.com/2009/06/gadget-how-to-iphone-tethering-without-jailbreaking.html

NOTE: THIS POST POSTED BY TETHERED iPhone!

From the Apple Byte podcast, Brian Tong says:
  • http://help.benm.at/help.php
  • Scroll down to tethering and internet settings
  • Press on the Download link
  • Select your country (U.S.A.)
  • Select your carrier (at&t)
  • You'll come to a page with an Install button
  • Then go to the home screen
  • Go to Settings
  • Go to General
  • Go to Network
  • Now you'll see an Internet Tethering Option
  • To activate - turn it on (either Bluetooth or USB)
  • Connect USB between iPhone and Mac
  • Network will automatically be detected