screencast

One of the defining concepts of working on a Mac is that things (usually) work just as you think they should. This is the culmination of good design translated into working code. The short video that follows is an example demonstrating how easy and intuitive it is to change the icon for an application. Believe it or not, it” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”s as simple as copy/paste.

This is a great trick to have up your sleeve when working with development tools that create a default icon, for example the Script Editor. With this approach you can quickly change an icon to reflect that something visually represents what the application does. And to help, do a quick search on Google for Mac OS X icons and you” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”ll be amused for hours…

In part 1 of this series I demonstrated how to create a short Java application in NetBeans that communicated, using AppleScript, to the Mac apple event system. The application was a no thrills look into how to invoke the TextEdit application. Despite the brevity of the application it provided the foundation for this next tip, which will build on the ideas to create something a little more salient, as in, something that you might actually find yourself using.

The gist of the application is to instruct iTunes to play a random song, move to the next song, pause, etc. I” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”ll show one use of the application by wrapping the code into a bash script that allows you to invoke the program (and all commands) from within a terminal. Watch the video that follows for all the details…

This application is all of about 80 lines, including the bash script. Sometimes a little creative thinking and a few lines of code are all that” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”s needed to write an intriguing (and hopefully useful) application.


The music in the video is Led Zeppelin and the song: Moby Dick. Led Zeppelin at Amazon


A few weeks back I demonstrated how to write Ruby code inside NetBeans to control scriptable applications on a Mac, that is, communicate between Ruby and the Apple Event system. In this post, I will turn things around a bit from the previous post and use NetBeans and Java to execute AppleScript.

There is a subtle difference, in the previous post the focus was on how to write code in Ruby (inside NetBeans) using the rb-appscript bridge. This time around the approach is to work with Java and pass AppleScript code to a set of Cocoa files (classes) that will act as the bridge between our application and the Mac system.

There is one caveat – the Cocoa-Java API is deprecated as of Mac OS X Tiger. The NSAppleScript and NSMutableDictionary classes are still available, however, they are no longer on the development path within Apple. There are scripting bridges that allow you to control scriptable applications using Python, Ruby, and Objective-C. Java Native Interface (JNI) is an additional option to call platform specific code. You can read more about JNI in this technical note: JNI development on Mac OS X.

One more note, if you follow the steps in this video and the classes NSAppleScript and NSMutableDictionary are shown with lines through them (for example, NSAppleScript), this has to do with a preference setting inside NetBeans to show deprecated classes with a strike-through. You can change this as follows: From the Preferences dialog, choose Fonts/Colors; click the Syntax option; from the Language list choose Java; click on Deprecated Element; in the Effects option, choose None.

Join me in Part 2 of this tip where I” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”ll show a more comprehensive (read: interesting) example where it” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”s all about controlling iTunes using Java.


The music in the video is Led Zeppelin and the song: Moby Dick.
Click the image to see more about about Led Zeppelin and the CD (at Amazon)


My day job is to lead the developer relations and community building efforts for Mojax, an Ajax framework for writing mobile applications. This type of work is a good fit given I’ve been in software development for nearly 20 years, working in roles from software engineering to training, chief architect to principal consultant, along with the fact that I enjoy an outward facing role that offers the chance to get out and talk technology with others.

The primary goal of an evangelist is to create a thriving community around a technology and/or product. One key aspect of this effort is to educate by providing insightful content and tutorials. To that end, I recently wrote an article for Dr. Dobbs that demonstrates how to build a Mojax application that searches for and displays real-estate property information.

The example that I created is built around the web services offered by Zillow.com, which provides a set of interfaces for accessing real-estate property information.

The figure below is a screen shot of the application running on a mobile device emulator. The information shown is from the primary residence of Bill Gates (and just who has the unenviable job of cleaning those 19+ bathrooms?)

Another tool of a developer evangelist is the screencast. If you’d like to see some of my work, and learn more about Mojax, you can kill two birds with one stone by following the links below:

And I’d be remis if I didn’t tell you that I don’t really advocate killing birds with stones :)

When working in TextMate, if you have a one or more lines of Ruby code that you would like to have the interpreter run, without the need for passing the entire file to the interpreter, this tip may be just what the doctor ordered.

For example, when debugging, often times it would be really handy to run a simple script at a specified location in your code to look at a value, call a method on an Object… The key point here is that you can have as little as one line of Ruby processed by the interpreter and the return value will be inserted inline.

This easiest way to get the gist of this is to watch the screencast below:

If you want to insert the results of one or more lines of script, directly into your code, using # => markers is the way to go.




The music in the video is J.J. Cale and the song: Call Me the Breeze.

A longer clip of J.J. Cale jamming:

I” onclick=”return TrackClick(” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”,” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”javascript%3AlynkVideoPop%28719%2C” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”)” onclick=” onclick=”return TrackClick(” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”,” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”javascript%3AlynkVideoPop%28719%2C” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”)”return TrackClick(” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”,” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”javascript%3AlynkVideoPop%28719%2C” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”)” onclick=”return TrackClick(” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”,” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”javascript%3AlynkVideoPop%28719%2C” onclick=”return TrackClick(”,’javascript%3AlynkVideoPop%28719%2C’)”)”ve covered some of the basics for working with ScreenFlow in the two previous posts. At this point I want to show you a non-conventional way that I use screencasts on a regular basis. What I am referring to is creating videos that are not meant to live on YouTube or another publicly accessible server, rather, videos that have a very limited lifespan, as in hours.

I often find that a quick screencast is the most efficient means to explain something, from how to install/configuration an application to pointing out a problem spot in a block of code.

For example, in the video that follows I talk through the steps I recently explained to another blogger for inserting code into a php file on a WordPress blog to display a Digg icon. The video is short and to the point.

The same idea holds in the next video, no bells or whistles, just a simple description on how to choose a color using the Color Picker application and use the hex value of the selected color to configure style sheet information in an application.

If you are already familiar with creating screencasts, or would like to give it a go, you owe it to yourself to download a free trial of ScreenFlow.

I apologize this video is no longer available. I had a system crash on my web host and was unable to recover the video. To make matters more frustrating I no longer have a copy of ScreenFlow to recreate the video.

Apologies for any inconvenience.

John

In a previous post on using ScreenFlow, I demonstrated some of the basics of this unique application for creating screencasts. What follows is another video demonstrating how to record video separately from audio. Unless you’ve spent time creating a screencast, and have experienced the challenges that come with the same, you might not fully appreciate the value of this feature.

Let me put it this way, I often find it challenging to synchronize all the moving parts, from typing code, clicking the mouse to verbally describing what I’m trying to demonstrate, and if there’s a means to simplify the process, I’m there.

There are tools available for recording video and audio separately, and mixing the two into a final product. However, ScreenFlow offers these capabilities in one tool.

Have a look at the video below to see how I create an audio recording inside of ScreenFlow and merge this with a video recording:

In my short time in working with ScreenFlow, I’ve been impressed with both its ease of use (read, short learning curve) and the powerful and well thought out (and implemented) features to take away some of the pain of creating screencasts.

This post is one in a series demonstrating a very intriguing application for creating screencasts,