Open Source

Open-Source: NSBegin*AlertSheet(…) with ^Blocks

There’s NSBeginAlertSheet, NSBeginInformationalAlertSheet and NSBeginCriticalAlertSheet, so the * is a wild-card for all those functions.

Apple Opensource Icon

picture credit: Apple, Inc.

What is this?

I’ve been growing more and more tired of always having to set up a callback-method (in the worst case, two, for didDismiss and didEnd) for NSBegin*AlertSheet(…) calls, like

– (void)alertSheet:(NSPanel *)panel endedWithCode:(NSInteger)returnCode contextInfo:(void *)info
{
 …code here…

Especially, since we have such a great thing like blocks where you can pass blocks of code as arguments to methods and functions, just like an Objective-C object.

So instead of having to set up callback methods for NSBegin*AlertSheet(…), I created ESSBegin*AlertSheet(…). Instead of callback @selectors, it takes blocks for didEnd and didDismiss callbacks.

I find it also makes for cleaner code having the callbacks right in the ESSBegin*AlertSheet(…) calls as you don’t lose the context of what’s happening before the call in my code.

Available for OS X Snow Leopard and up

Blocks were introduced with OS X Snow Leopard, so I assume (yes, I assume since I’ve only tested this on OS X Mountain Lion) it should run on Snow Leopard as well.

Download and Usage

NSApplication+ESSApplicationCategory Github Repository (refer to the read me for how to implement it in your projects)
Eternal Storms Software Open Source Projects

 

 

 

Enjoy! And let me know what you think 🙂

Take care,
Matthias

[twitter-follow screen_name=’eternalstorms’ show_count=’yes’]

Read more

Docset Icon

picture credit: Apple, Inc.

What is ESSVideoShare?

ESSVideoShare is a framework Cocoa (Touch) developers can use in their projects to easily implement uploading videos to the popular video sharing services YouTube, Vimeo, Flickr and Facebook.

With a few lines of code, developers can implement this functionality and the framework will do all the heavy lifting.

Now available for iOS, additionally to OS X Lion

Originally, I had designed this framework for OS X Lion only. However, since the code base is mainly dependent on the Foundation framework which is available on both the Mac and iOS, I figured it would be a) really neat and b) easy to bring this framework to iOS as well.

The actual process of implementing the framework in your iOS project is a little different than for OS X – on OS X, you build the framework from the source and then add that framework to your project, on iOS, you take the source files of the framework directly and copy them to your project. Other than that, everything else remains the same.

Sample Projects and Links

ESSVideoShare open source project on GitHub

OS X Lion Sample Project (~250 KB)

OS X Lion How To

iOS Sample Project (~3 MB)

iOS How To

 

Enjoy – and please let me know if you use this in your projects, I’d be happy to hear about it 🙂

 

[twitter-follow screen_name=’eternalstorms’ show_count=’yes’]

[twitter-follow screen_name=’flickeryapp’ show_count=’yes’]

[twitter-follow screen_name=’screenfloatapp’ show_count=’yes’]

[twitter-follow screen_name=’gimmesometune’ show_count=’yes’]

Read more

NewImage

Today I released my first open source framework for OS X Lion – ESSVideoShare.

What is ESSVideoShare

It’s a framework for OS X Lion that makes it very easy to implement video publishing to these services:

YouTube, Vimeo, Facebook and Flickr

What you need

Import ESSVideoShare into your project, make sure ti’s being copied to your app’s bundle in a build copy phase.
And of course, for each service, you need an API key.

I explain the process of implementing ESSVideoShare step by step on its github page.

In-Depth

If you’re interested in how it all works, please head on over to the public github repository.

Support

If you have any questions or suggestions for improvement, be sure to let me know either through the comments below or by mail 🙂

Take care,
Matthias

[twitter-follow screen_name=’eternalstorms’ show_count=’yes’]

[twitter-follow screen_name=’flickeryapp’ show_count=’yes’]

[twitter-follow screen_name=’screenfloatapp’ show_count=’yes’]

[twitter-follow screen_name=’gimmesometune’ show_count=’yes’]

Read more