Best way to get started using ASobjC

I have been searching around for the best way to get started on learning making a Cocoa AppleScript application. I have read thru the Xcode 3 based tutorial in these forums, but it seems to be fairly out of date at this point.

I am a fairly experienced at AppleScript and UNIX, and have played around with XCode over the years.

The project that I want to, eventually, create is a fairly simple app that can display arbitrary photos full screen and be fully controlled by AppleScript. I have searched around for a scriptable app that will do this, but all of the apps I have found revert back to the desktop in between each photo.

Any suggestions or help appreciated.

Don

I’m obviously biased, but I think my book should help get you started. As far as I know, it’s the only book on AppleScriptObjC.

I think so too!

Not the biased part but that your book will help people getting started. It’s a good book even if you are already familiar with AppleScript and Objective-C/Cocoa.

Mmmm :confused: . There is a difference between Objective-C and Cocoa. Most books do explain Cocoa and don’t explain Objective-C, but the books who do are really good books. I’ve never read the book but developers without any background from C nor any superset of C are very pleased with kochan’s explanation about the Objective-C language. When Apple Introduced Mac OS X (also Cocoa) I bought Hillegass’s explanation about cocoa, because I was already familiar with the C and supersets, I hadn’t had to learn Objective-C, only Cocoa. For me it was the perfect book.

Don,

I am not bias; have exchanged a few messages with Shane; but never met him :slight_smile:

I have also been using UNIX since the mid '80, have a degree in CS and although an IT professional I not a programmer.

I too decided to learn AppleScript the summer before last; and Xcode & AppleScript last summer; which brings me to Shane’s book; which I concur is simply the best programming book I have ever purchased (apart Learning PERL and The C Programming Language by K&R '77 edition). Buy the book, you won’t regret it!

You should also search on Youtube where you’ll find some (good) intro to AppleScriptobjC tutorials (on which I am bias) and must confess I did try my hand at creating a few myself, one based on chapter 3 of Shane’s book and one far more loosely on some later chapters.

http://www.youtube.com/watch?v=qYp9iavVcyA (my first try, based Shane’s book, to long (my video, not Shane’s book that is)
http://www.youtube.com/watch?v=dp1Yb1Y0Wns (my second, much better and to the point, and far more loosely covering some of the material in chapter 4 & 5)

Stay in touch; I am still learning Xcode & AppleScript.

Model: Macbook Pro
AppleScript: 10.7
Browser: Safari 536.30.1
Operating System: Mac OS X (10.8)

thank yo everyone for the advice. The book has been purchased.

The book very clearly states that it covers Xcode version 4, so just to be clear, this is not a complaint, but is meant to help anyone in the same situation.

I had already upgraded to version Xcode 5, so I figured I would see how far I got before a major difference stopped me from going any farther. I got stuck exactly here, on page 14…

Making Connections
NOW switch back to MainMenu.xib, using the jump bar at the top of the editor area or the Project Navigator on the left. (You show or hide the Navigator area using the View selector in the project window’s toolbar.) You want to make the button trigger the handler, and you do this by making a connection between the two. There are a couple of ways to do this. You can control-click-and-drag from the button to the icon that represents the script, let go, and then click on doProcess: in the window that appears (see screenshots next page); or you can go the other way, and control-click on the icon for the script, and drag from the circle next to doProcess: to the button (screenshot at bottom of next page). Save.

I have poked around a bit to find how this has changed in Xcode 5 but I am stuck trying to make a connection.

Hi,

the procedure to make connections is actually the same in Xcode 4 and 5.
If you’re looking for the document outline of the interface objects, click on the button in the bottom left corner of the interface canvas.

A shortcut to show/hide the project navigator on the left side is ⌘0
A shortcut to show/hide the utilities area on the right side is ⌥⌘0 (you get the connection inspector with ⌥⌘6)

Thanks for the reply.

I should have been more clear, I cannot find “the icon that represents the script” described. The icon in the project navigator (the generic OS X app icon) doe snot show a doProcess option after I control dragging. The Blue box does not pop up any options.

in the project navigator, select MainMenu.xib.
You will see the interface canvas and the interface objects between the canvas and the project navigator