Gonna Needa Pasteboard

© 2009 James Dempsey

Well, you’ve got an application
It has some things to share
With them other applications
Well, you gotta stick that stuff somewhere

You’re gonna needa pasteboard, baby
To move that stuff around
Oh treat the pasteboard right and
It will not let you down

The pasteboard’s quite inviting
for the classes you invent
NSPasteboardWriting’s
The protocol you implement

So you can write ‘em on the pasteboard, baby
Common Cocoa classes too
Just toss ‘em on the pasteboard
And their data will shine through

Let’s do some writin’ !

First get a pasteboard
Then clear the contents
Then write them objects
It’s literally 1-2-3

To write ‘em on the pasteboard, baby
Easy as fallin’ off a log
But don’t do the pasteboard wrong now, no no
Or it might diss you in its blog

Well now you’re draggin’ and you’re droppin’
Just the way you like to do
Oh, but that joyride will be stopping’
If you can’t get the data through

You’re gonna need pasteboard, baby
For the contents of the drag.
Oh treat the pasteboard nice and
No no you won’t hit a bump or snag

Now NSPasteboardReading’s
Got the power to create
It’s what the pasteboard’s needin’
So it can instantiate

What you’re reading off the pasteboard, baby
All that its contents will allow
Just ask for what you’re needin’
You’ll receive without much sweat upon your brow

Let’s do some readin’ !

First get a pasteboard
Specify some classes
Then read them objects
Also literally 1-2-3

To read ‘em off the pasteboard, baby
Yeah you can read all night
But don’t leave the pasteboard lonely, no no
No, two reads don’t make a write.

And then sometimes you just might find
That you require more specificity

To determine type by type
Exactly what you read and write is supposed to be

You can use a pasteboard item
You can read ‘em, you can write ‘em just as you desire

Use them to achieve your goal
Or if you’re just into control
Then that should surely set your soul on fire

Well you might want to write a service
To make any text a tweet
But then you might get nervous
How that transfer will complete

Well, you’re gonna needa pasteboard baby
For the service you provide
Just put your data on there
Pasteboard takes it for a ride

Well the pasteboard’s not too flashy, no
But that don’t make me sweat
Just ship an app without copy and paste and
See how far you get

You’re gonna needa pasteboard, baby
Or it surely would be missed
So treat the pasteboard right now
I think your users will insist

Don’t do the pasteboard wrong now
I think by now you get the gist

So use the pasteboard wisely
To build an app we can’t resist


Gonna Needa Pasteboard debuted alongside the introduction of new NSPasteboard API at WWDC 2009.

( OS X )

Vocals: James Dempsey
Guitar: John Scalo
Drums and Bass: Russell Bond

Music and Lyrics: James Dempsey
Recorded and Produced by Russell Bond at The Annex Studios