Author's Posts

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

useless error message

“Positive” Error Messages

For me, “positive” error messages are alerts that tell you something “failed” because the user has already done it before and so there’s no use in doing it again.

Like in the example screenshot above. The user added, at some point in history, a photo to their favorites. Now they stumble upon this photo again in some user’s photo stream and add it to their favorites again. And this error pops up, telling them they’re an idiot for not remembering it’s in their favorites already.

Necessity of Feedback

Giving the user feedback on what they do is very important, no argument there. But you have to be careful not to cross the line from giving helpful feedback to just being outright obnoxious or worse, unnecessarily interrupt the user’s workflow.

Alert panels are a good way of telling the user something went wrong when it needs their (immediate) attention. But halting the application to tell the user something has already been successfully done – what’s the use in that?

Example: flickery

flickery is the app where I run into this most often. “Photo already in favorites”. “Already in Group”. “Already in Set”. “Already in Gallery”. “Already member of the group”. etc.

Early versions of flickery did have these alerts in them. Actually, I hadn’t given it much thought at the time. But using the app a lot myself it quickly became clear to me that it’s just plain annoying.

flickery does have a “flying” animation when adding photos to favorites, sets, groups and galleries. Isn’t that all the feedback necessary in that case?
The user is informed something happened and that’s what counts. And if it’s already in there – who cares? Putting it in there was the point all along.

I do the same thing in ScreenFloat. When you add a shot to a category and it’s already in there, you won’t see an error panel telling the user it’s already in there. That was what they wanted anyway.

So, what’s the point?

Short and simple: avoid alerts, if you can.

They disrupt the flow of the app and take the user away from what they’re currently doing. There are many better ways to let the user know something happened – especially if it’s positive feedback.

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

Read more

NewImage

© Image by Apple, Inc.

OS X Mountain Lion

OS X Mountain Lion has hit the shelves on the Mac App Store and it’s off to a very good start.

So where are the updates for Yoink, ScreenFloat and flickery?

For all of my apps, I’ve submitted updates to the App Store at the beginning of July but they’re still “In Review” or worse, “Waiting for Review”. Here’s the run down of what’s working or not working on OS X Mountain Lion.

Yoink

Yoink works perfectly fine in the currently available version (2.1.1). The upcoming update is a bugfix and minor feature release.
Nothing really changed for Yoink in OS X Mountain Lion that would break the app.

ScreenFloat

ScreenFloat has some minor issues. It works well, but you’ll notice that the “Launch ScreenFloat at Login” checkbox in the preferences is enabled although it shouldn’t be and will crash the app when clicked.

Another issue is with running ScreenFloat with the Dock icon enabled. Floating shots will not follow you to fullscreen apps or spaces. I’m currently looking into that. In the meantime, you can disable the Dock icon and it will work.

flickery

flickery is the most troubling. Not because of OS X Mountain Lion (some minor issues aside – like, the “Nearby” search doesn’t show up – it works well).

The troubling part is that flickr is shutting down their flickrAuth authorization mechanism by July 31st. Yes, that’s very soon and there’s no update out yet for flickery.
I’ve requested an expedited review by Apple for it and I hope they grant it.

If they don’t (and still, if they do, there’s a chance), it might take longer than July 31st for Apple to review the app. What that means is that authorizing flickery to work with your flickr account will not be possible. Also, although flickr doesn’t explicitly state this, it’s inferred that anything done over the flickr API with an old authorization token (an authorization token is what an app receives from flickr when the user authorizes the app to work with their flickr account) will not work anymore. So browsing, uploading, really anything you can do with flickery, will not work.

Please be aware that the upcoming update does include the new OAuth authorization and will make flickery work again with flickr. Until it is reviewed and released by Apple on the App Store, please have a little patience. I know it’s not ideal, but at this point, I’ve done all I can do.

Concluding,

aside from some minor issues with ScreenFloat and flickery, everything basically works on OS X Mountain Lion. For these issues, updates are currently “In Review” or “Waiting for Review” by Apple and should be released soon.

As for flickery, I’ve requested an expedited review and I urge you one more time to consider having a little patience 🙂 Trust me – it troubles me more than anyone.

Thank you for your time,
Take care,

Matt 

[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