Post Time Bug

A bug seems to have slipped through my JavaScript of Human Time Posts. The post before this was definitely posted in the wee hours, yet they are being treated as posted around lunchtime. Must fix that. And the fact I’m now running under daylight savings. (Fixed, needed to update the Options).

Custom Address Book Fields

Creating custom Address Book fields wasn’t quite as painless as I’d hoped. At least, not in a form that doesn’t look like being broken in future updates. The simplest method is to choose a field you aren’t already using. I chose Related Names, since I didn’t know until that point that this field existed! The other fields that were available weren’t really appropriate: Maiden Name does not allow for duplicates, and Dates is designed, for, well, dates. The next step is to set up the template. Go to Preferences, and choose the Template tab. Choose Related Names from the Add Field popup menu, and alter the label to whatever you want it to be. Now, you can go and add data of the type you require. Some caveats: the items in the Template will only appear if the record (person) you are editing does not have any items in the ‘Related Names’ field(s). If they do, you can add extras, but the ones you added to the Template do not appear in the list. Might file this as a bug.

Cable Management

Hold that last post! I just saw these designs for cable management, over on Sumajin. Plan for tomorrow. 1. Create something like this out of acrylic. 2. Enjoy not having dangly cords everwhere.

Headphone Cable Length

I really like my headphones I use for my iPod. I blogged about how good they were back in July, but I’ve decided there really is something I don’t like about them. Basically, the cable is too long. If I just plug them in, and put the iPod into my pocket, the cable hangs down to my knees. The weight of the cable at this length means that they are almost pulled out of my ears, and don’t feel comfortable. If I wrap the cable around the iPod, it’s much better, but I have to ensure I get exactly the right number of loops, as either the cable is then too short (and is pulled out of my ears if I turn my head), or is still too long. And having the cable wrapped around the iPod means it’s harder to get into my pocket, and harder to control when it’s in there. (I’ve discovered you can change the volume through fabric, as well as skip tracks). I’m considering buying some of the Apple branded in-ear phones I saw in the AppleCentre the other day. I might just try replacing the plug with another one, and shortening the cable, first. All I have to do is find a nice looking 3.5mm plug, now…

Address Book Smart Groups

Smart Groups in Address Book are crap. You are limited to less than 20 options. And Related Names isn’t in them, so I can’t do a lot with the data I have, in terms of Smart Groups. I need to be able to say:

People who (are in Group CSTA Database) and (Related Names: Referee > 0) Or, even simpler: People who (are in Group CSTA Database) and (Related Names: Gender is Male) I can get away with (Card contains Male), but this will also pick up anyone who happens to have Male in their name. At least it doesn’t pick up Females, that’s a start. Otherwise I’d just have to have a does not contain Female clause. However, the biggest kicker is not being able to refer to groups. I’d like to be able to have lists that get people who are in a particular group, but also have some other attribute. Oh, and I suspect that you cannot search using Spotlight, as this would require seperate files. Oh for the joyful days of BeOS, where people files existed, and you could just add extra attributes, as you chose. And then use queries (which, by the way, are much faster than Spotlight searches!) to find what you want. And it had the ability to create really complicated queries, really simply. And modify them easily to get exactly what you want. • While I’m on bitching about Address Book: I just looked through all of the Package Contents, and the HTML exporter seems to still use font tags. Ugh!

Address Book Scripting

I’m trying to save time by creating some simple scripts to add values to Address Book entries. For instance, I have a whole lot of people in a group who are living in the same state, and I want to add this to all addresses. However, it doesn’t seem to be possible to get or set the state of an address:

1
2
3
4
5
    tell application "Address Book"
    	tell my card
    		set the_state to state of address 1
    	end tell
    end tell

This fails. With the very helpful:

Address Book got an error: Can’t make state of address 1 of my card into type reference.

Which means absolutely nothing, as far as I can tell. Googling this string brings no joy. Now the weird thing is that if I switch over to another user, it works fine. Update: I quit all running Apps (with the intention of restarting, but System Update stopped me) and retried it. It worked. Something I was running was interfering with it, but I have no idea what.

Category Pages

I want to add some functionality to my site. I used to just have a few categories, but as I wrote more, I wanted to sub-categorize a bit. So now, I have a handful of parent categories, and under (most of) these I have one or more child categories. In some cases this goes three or four deep. But, so the category list isn’t too long, I only show the parent categories in the sidebar. What I want is that when a category page is shown, at the top is a list of the child categories. I can (relatively) easily find out if I am viewing a category page: {if $smarty.server.REQUEST_URI|truncate:10::1 == '/category/'} I can also quite easily find the name of the category, but not the id. This is what I need for creating the category list. I’ve just had a thought. Checks something. The following displays the info that is sent to the server: {foreach from=$smarty.server.argv item=var} {$var} {/foreach} I was hoping it would give the category id. But it doesn’t, only the name. Back to the drawing board.

Return to Men's

Well, first game back in Men’s A Grade, and a fair start it was too. Playing with a about 4-5 guys I’ve coached, and two I’ve actually played with, along with a whole host of new guys (including one playing his first game!), it was, as always, a little slow to start. New teams generally tak e while to iron out all of the bugs. About level with Diamontec at half time, we drew away from them in the second half. Lacking fitness, I had to rely on skill (that’s a dangerous choice!), and managed to post home a couple of touchdowns myself. The last of which was really only because Paul and Hully wrapped around me, but the nice little fake settled it. The nicest thing is that after a 6-2 victory, we are top of the ladder! No Dumps next week, at 6:15. Should be a bit more challenging, I’d say…