In Case Anyone Was Wondering …

why I’m not just grabbing the iCal files for holidays from here and parsing them into Horizon, it’s because Apple seems to treat every day with a special name as a ‘holiday’.
In Horizon, holidays are days when the banks and financial institutions are closed, and most people aren’t working. Apple includes, at least for Canada and the U.S.: Election Day’, ‘Daylight Savings’, ‘Groundhog Day’, just to name a few.

Holidays Preferences, First Pass

Holidays Preferences

This is my first pass at the holidays preference. I know it’s pretty plain, I also know that I can’t put a date spinner in the second column instead of the date formatter that’s already there. That’s due to a known bug in Interface Builder, or Cocoa, or something, somewhere *grumble*.

The good news is that it’s already localized, kinda. Instead of storing the holiday data in the main preferences file, it stores them in their own file called “HorizonHolidays.plist” in the user’s ‘Library/Preferences’ folder. This means I can make up default files for the US, Canada, the UK, and anywhere else where I know what the statutory holidays are, and users can even send me plists for the holidays in their country, and I can make them available from the web site.

So, what can I do to make form more appealing and easier to use? Suggestions, please. i know it’s not quite right yet, put I can’t put my finger on the solution.

… followed quickly by 1.2.6

Sorry about that. There’s a couple of bugs in 1.2.5 that I had to fix, even though they’re mostly cosmetic and/or minor annoyances. Also, my payment processor, esellerate, shipped a new version of their libraries which are supposed to provide some improvements, so I rolled those into 1.2.6 as well.

Unfortunately, it wasn’t a seamless transition, since esellerate decided to change the name of one of their header files. This broke the builds and screwed up the revision control system. Bad esellerate! No cookie!

I’ve also been having problems with customers activating their licenses. The esellerate engine is supposed to automatically install and register the serial number when you buy a license through the program, but it doesn’t always work. I’ve had a small number of people with this problem, and there’s an easy fix. I can send you a little program, customized with your name and serial number, to patch Horizon.

I’m hoping, though, that the new version of the esellerate libraries will make this unnecessary. But if you do have a problem with the program saying it’s still in trial mode after registering it, by all means let know know right away! The fix is quick and easy, and I want to make sure my customers are happy.

Security? Ha!

My bank’s web site has been annoying me for a while now. The password field is a maximum of eight characters which, as anyone with half-a-brain knows, is really weak. So recently, they’ve tried to increase the security on their site. Not but extending the password field and requiring strong passwords, oh no. I’m sure some crusty old mainframe COBOL programmer told them that was too difficult.

Instead, they’ve implemented this challenge-response system of five trivia questions about your life. Stupid questions that can have ambiguous answers. Like, “What is the name of the street that you lived on when you were 10 years old?” Well, what if we moved when I was ten. Which street should I use? or”What was the name of your first pet?” Well, which ‘first’ pet? The goldfish? I don’t think it had a name. The turtle? I don’t remember. The cat? That was my sister’s and then my mother’s, so that doesn’t really count.

So I fill in my best guess answers to five dumb questions like this, and the next time I want to access my bank account, after typing in my weak 8 character password, I get one of these challenge questions. I can’t remember the answer I set up, so I get locked out.

*Sigh* Phone the bank. Ignore all the stupid number prompts and hit ‘0’ for an operator. Tell them the problem. Attempt to answer all kinds of questions about my account, in order to prove that I’m me. Most of the questions were of the kind I could answer if I could get at my damn account! Finally, the password gets reset to a temporary 5 character password. Really tight security there. And I’ll have to re-enter all the challenge-response questions again. But, the operator has a suggestion. Why don’t I print them out and keep them near the computer. What a good idea! Why don’t I write my password on a Post-It note and tack on my monitor, while I’m at it?

So, security experts in Canada, if you’re wondering why you can’t find a job, it’s because it’s been taken by an idiot at a major Canadian bank.

Version 1.2.5

A few bug fixes, (although the random crash associated with drag-and-drop is still out there. *Sigh*) and some pretty solid keyboard navigation shortcuts highlight this release.

There’s two new menu items on the ‘View’ menu, ‘Go to Today’ and ‘Go to Date…’ both blatantly stolen from the iCal interface. Hey, you know what they say about great artists, right?

The keyboard interface, however, is unique to Horizon. Here’s a rundown of the keystrokes and their functions:

  • Arrow keys move the selected date on the calendar.
  • Cmd + left arrow and Cmd + right arrow to change the month.
  • Cmd + Enter to add a cell, or edit existing cell, on the selected day.
  • Cmd + Delete to delete an existing cell on the selected day.
  • Alt+ Up arrow and Alt + down arrow changes the selected category.

So now you can zip around the calendar pretty easily, and your hands never have to leave the keyboard. This is good for the power-user types and those who have a lot of data to enter.

Thanks to Johan for suggesting this and testing this release.

Is This What They Call Guerilla Marketing?

I’ve uploaded the ‘Blooper’ reel of Horizon outtakes to YouTube. (Yes, they were faked. My real goofs were boring, not funny.)

On a more serious, painful note, I discovered something odd in the way Cocoa handles keyboard input. You can trap most keyboard events with the keyDown: method. I’m using that to catch the arrow keys for keyboard navigation on the calendar.

The next step was to catch Command (the Apple ‘cloverleaf’ key if you didn’t know the official name) plus the arrow keys to move through the months. Cmd (Command) + left arrow for the previous month, Cmd + right arrow for the next month. Using the event modifier flags I can catch the Command key and make that work. So far so good.

Next, I want Cmd + return to create a new cell or edit an existing cell, and Cmd + delete to delete and existing cell. The keycode for return is 13, just like the old ascii value. And delete is 127. But keyDown: just ignores return, Cmd+return, delete, and Cmd+delete.

The answer turns out to be a different method, performKeyEquivalent:. The documentation on this method is very poorly written, but the gist of it seems to be that the method is intended for custom implementation of keyboard equivalents of menu items. So I can trap Cmd+enter in that method, and Cmd+delete. All I have to do is look for the numeric codes for enter and delete, do my thing, and return YES. I don’t have to check for the modifier key, but I do have to use charactersIgnoringModifiers: instead of just characters: to get at the keycode. The only other odd thing is the Cmd+left arrow, and Cmd + right arrow are not handled here, but back in keyDown:.

If anyone can explain the logic behind this to me, I’d love to hear it.

Horizon 1.2.1

Hot on the heels of Version 1.2, Version 1.2.1 is available, as a DMG, or through the software update. This release fixes a number of bugs, including missing items on the French menus, and a rather annoying bug that would leave the intro video playing after you closed the Welcome Panel!
I’m surprised no one complained about it. Is everyone that enraptured with the sound of my voice? Nah.

And … I’m spent

Horizon 1.2 is out. The dmg is available from the Downloads page, and if you’re running an earlier version, you can update automatically, or use ‘Check For Updates’. I won’t go into the features here, because they’re covered on the main site.
I did manage to slip in one little extra, though. If you go to the ‘Screencasts’ page, and click on the last link in the sub-menu, well, I think you’re in for a bit of a surprise. 😉

Almost Ready!

Horizon 1.2 will be released tomorrow morning. I’ve done a lot to the program, and added some major features, but you’ll just have to wait a few hours to what I’ve done.

One feature I will tell you about because it’s not that big a deal, but it is fun. I’ve added the Mac ‘poof’ effect. Delete a cell from the calendar and it vanishes in a puff of smoke. Nothing earth-shattering, but it is a nice effect.

If anyone wants to implement this, ignore the antiquated Apple sample code and the other weird little samples floating around the ‘net, and just search the documentation for NSShowAnimationEffect. It’s a C function call with a lot of parameters, but for simple things most of them can be set to nil.

It’s also important to note that the NSPoint supplied to the function to center the effect is in screen coordinates, so you have to use a few methods to get from the View to the Window to the Screen, depending on what you’re doing.