Still can’t GetLabel()

So we’re at a point in our development cycle where we can finally upgrade our toolset. Installed Xcode 3.2.3, using the LLVM-GCC4.2 compiler, the 10.6 SDK, and setting 10.5 as our minimum OS.

Of course now I compile code and lots of OS function deprecation warnings come up. Time to clean up the source code.

If you need to obtain a Finder label, the old-school way was to use GetLabel(). Even today we still have to use GetLabel(), despite the fact they have deprecated it since 10.5. And while they deprecated it in 10.5, they didn’t provide a replacement API until 10.6. Unfortunately this replacement API isn’t 100% workable.

1. It’s an Objective-C API, in AppKit. Specifically: -[NSWorkspace fileLabels] (and -fileLabelColors).

The old API was a pure C API so you could easily use it anywhere, and we use it in a pure C++ library. Fine. I can create a .mm file with an extern “C” function to provide my own C wrapper and mimic GetLabel()‘s API. But it’s just extra work.

2. It’s only available as of Mac OS X 10.6.

It’s not a huge problem, but it’s irritating they deprecate the old way and didn’t provide a new way until the next OS revision.

3. -fileLabels crashes.

Isn’t that wonderful? They provide a new API and the new API doesn’t work.

And it’s not like it’s any sort of difficult API to work with either. It’s just a simple call.

But how can you get it to crash? Simple. Call [[NSWorkspace sharedWorkspace] fileLabels] 3 times. The first time will be OK. The second time might generate the crash but could also just generate console messages. The third time, you should crash or certainly generate bad messages in the console. If you didn’t crash the third time, certainly on the fourth you should. But typically 3 calls and boom.

-fileLabelColors doesn’t have this problem.

Investigating it, it seems there’s something being double-released/freed/deleted inside of -fileLabels. You can turn on garbage collection and it won’t crash, but lots of ugly console messages are generated.

What also bugs me? How did this API ship with such a bug?  Didn’t they test it? Didn’t they unit test it? Did they only test it under garbage collection? Did they write the API only for the Finder and figure if the Finder wasn’t crashing that was a good enough test to say a public API for the OS would work?  I mean, I can understand complex bugs, I can understand how code paths can be what they are and how bugs can ship (been a professional software engineer for over 15 years). But something like this? I can’t see how this managed to get out the door.

*sigh*

rdar://problem/8301881 Seems it was also reported as rdar://problem/8084710.

So… there’s no GetLabel() replacement for me until they fix it, 10.7 if I’m lucky. Yes I’ve considered other workarounds, no they won’t work in my particular context, or with a lot of work I could get it working but it’s not mission critical and I have bigger issues to deal with.

Updated: Apple DTS wrote back saying this is a known issue being tracked under its original number: rdar://problem/7287108, which as you can see is at least the third report of the problem. So we can only hope Apple’s going to fix it, but I bet we won’t see it until 10.7 at the earliest.

It’s not a parking space

You’ve seen them.

Handicapped parking spaces.

And there’s always this large “border” around them, of white-hashed lines filling in areas and typically making paths from the parking space to the door of the building.

Do you know what those are for? People with wheelchairs and other assistive devices to be able to maneuver. They need the room. If the van has a wheelchair ramp, those things are big and need space to unfold and descend so the person can get in and out of their van.

Do you know what those are not for?

Leaving shopping carts.

Parking your car.

And the worst offenders I see are motorcyclists (speaking as one myself) parking their bikes in them. Yeah yeah I know, you don’t want to park your bike where someone might knock it over, but now you’re parking in a way that could lead someone in a wheelchair to get run over. Park in a proper parking spot like everyone else… not in the handicapped lanes, not on the sidewalk either.

For that matter, if you’re not truly handicapped, don’t use a mirror hang tag just to get a “close in” parking spot when you’re perfectly able-bodied.

I’ve got a nephew in a wheelchair, and one of my best friends is in one too. Seeing people abuse handicapped parking spaces bugs me.

Rangemaster August Newsletter

The Rangemaster August 2010 Newsletter is now posted.

While there’s many useful things in the newsletter, what I found most interesting was the article “The Evolution of the Defensive Handgun Cartridge”. Very cool.

Rampant Chaos

A long-desired dream of Wife’s is finally coming true.

We’re getting the house renovated.

Flooring, paint, all sorts of things. It’s a big undertaking. Some things were completed before we went to Omaha, and right now we’re in process of getting the big work done: floors and paint.

Wife and Kids are all gone, which is good. They’re staying at casa de Wife’s parents. The house is a wreck, barely inhabitable, loads of stuff in the air which would be ugly for the kids to breathe. Heck, I had to change the air filters on the furnaces today because they were caked with dust from all the tile demolition; I need to go to Lowes to pick up more filters because I know I’ll need to change them again very soon. I have to eat out for most every meal, which has its pros and cons. Tonight I’m going to go get some Thai food. Mmmmm.

So it sucks right now, especially being home alone and with much of “habit and routine” out of whack due to the state of the house. But I know I’m blessed and fortunate to be able to have this work done, and I know when we emerge on the other side the house will be beautiful and Wife will be happy.

And in the end, Wife being happy is all I really care about. 🙂

I wanted to go visit a local Aikido dojo tonight, but the painters are still here and I can’t leave. So the visit will have to wait. I’m itching to try Aikido. I don’t know how the experience will be, and I really don’t care at this point how it will evaluate. It’s just the next path on my journey that I wish to explore. It will be what it will be.

And to bring guns into the discussion… it’s cool to talk with the guys doing the work. They’re all hunters to some degree or other. I’m sharing some of the water buffalo meat with them because, why not? 🙂

Concealed Carry in Omaha

This trip to Omaha was my first road trip with my concealed handgun license.

Short summary: uneventful, but strange.

Resources

First, let me list the resources I used in planning:

opencarry.org – while I had no plans on open carrying, opencarry.org has a lot of useful resources, such as their maps and a Nebraska-specific forum.

handgunlaw.us – which contained a great number of legal resources, such as summary and reference of Nebraska’s laws.

concealedcarry.net – which has more legal resources, such as a reciprocity map and a trip planner.

Travel

We were driving, so I used the resources to see what laws would be like as I traveled to Omaha. In the past my drive took me through Texas, Oklahoma, Kansas, Missouri, Iowa, then into Omaha. However, I could see Iowa could be sticky so I took a different route that went from Texas to Oklahoma to Kansas, then directly into Nebraska. Google Maps even showed that as the best route from here to there, so all worked well.

You must remember that while there are Federal laws regarding firearms, much of what you’d actually deal with would be state laws, so you needed to know your stuff. Thankfully, most of the laws for the states I was travelling through was similar enough, at least in ways that it mattered. For instance, I was only traveling through Oklahoma and Kansas so I didn’t sweat details like churches or government buildings… but could rest stops be an issue? Apparently in Oklahoma, yes, but only if you went into rest stop buildings. I spent more of my time being concerned with the details of Nebraska and Omaha specifically.

Omaha Details

Unfortunately due to gang violence in Omaha, Omaha has enacted a lot of “feel good” laws that have served to only abridge law-abiding citizens and do nothing to curb criminals. For instance, you apparently can open carry in Omaha, but you must get a permit to do so. Omaha required registration of guns. But yes, past tense.

While you can conceal carry in Omaha, a simple sign is all it takes to deny lawful carry. I’m used to Texas’s “30.06” signs, which means the signs are well-defined and without question. Nebraska has no formal sign (tho they have a suggestion), so it makes things a little less clear. Here’s a sign from the entrance to the Omaha Henry Doorly Zoo:

It’s one of the better and more clearly defined signs that I saw around town. And believe me… I saw a LOT of denial signs. It’s a shame tho because it demonstrates a great misunderstanding. The only people who will be denied and that will obey are people with CHL’s — these people have been vetted by the system, background checked, fingerprinted, educated, tested, and generally deemed by society to be good, law-abiding folks. Meantime, the criminals and gang-bangers are just going to waltz into the zoo without a care in the world. The signage stops the people who shouldn’t be stopped, and doesn’t stop the people who should.

*sigh*

But here’s one odd point.

Back in 2007 there was a shooting rampage at the Westroads Shopping Mall. If I remember correctly, Westroads was VERY anti-gun, signs all over the place denying guns, banning guns on the property, and so on. Obviously those signs did them no good, and one could argue it made for a victim-rich zone and helped to create the tragedy. I went shopping at Westroads with Wife — we even parked outside the Von Maur department store and went into the mall through the Von Maur doors. I saw no signs denying lawful concealed carry anywhere. I still don’t know what Westroad’s policy is, but it seems they aren’t willing to allow the same tragedy twice.

I also find the signs interesting from a legal vs. “normal humans” standpoint. The way the signs read, it denies concealed carry. So… could I switch to open carry and enter that establishment? Of course, in Omaha it may require their open carry permit, but say I had one. How does this all play out legally? It’s evident that if an establishment posts those signs they don’t want guns at all, but the wording is such that it implies open carry would be alright.

It’s all rather odd and I’ll just say I’m happy to live in Texas.

To Nebraska’s credit, the CHL law is still young, but I’ve watched them over the years and they are working to clarify and improve the laws. So, just have to give them time… because the wheels of the law should generally turn slowly.

So….

So to me, I’m glad I was able to continue carrying on my trip. It’d be nicer if things were simpler and more straightforward. For instance, while many driving/road laws are state-based, there is great uniformity across the states. This greatly facilitates interstate travel. Such uniformity would be welcome in laws pertaining to concealed carry and self-defense. In many respects the laws are similar, but the devil lies in the details and that’s where it’d be nice to see improvement.

I’d also like to see Omaha improve. Yes I know gang violence is a problem, but denying and abridging the law-abiding is not going to help anything. The laws are well-intended, but good intentions pave the road to Hell. Just remember that.

All in all, an uneventful trip (in this regard), and that’s a good thing.

Texas Women

Hank Williams, Jr. wrote a song about Texas Women:

and I have to agree.

Any time I leave Texas, like last week when I was in Nebraska, I observe what’s around me. And sure, I see lots of pretty women. But they just can’t hold a candle to Texas women.

I’ve had many a discussion with other folk (including Wife, native Texans, and non-Texans) about this phenomena, and they all agree. There’s just something about how they grow ’em down here. 🙂

God Blessed Texas. 🙂

Trees

Nebraska City is most famous for being the home of J. Sterling Morton, founder of Arbor Day.

As you can imagine, trees are a big part of the city. Of course, just having lots of trees around, many varieties, parks, orchards, and so on. But trees are also a large part of the city commerce. Without trees, the city would not be what it is. It provides a reason for people to come to the city, a reason for visitors to spend money, thus the trees help to create businesses, to create jobs, which then allow people to care for themselves and their families. Granted, there’s a lot more to Nebraska City than trees and Arbor Day, but certainly trees are the big thing.

What I found interesting to observe was the dynamic in Nebraska City of how they regarded trees. They were not holy objects, they were not held above all, but they were respected and well-regarded because they are an important resource in many regards. They could not waste trees, they could not harm trees, trees had to be cared for and managed because without them there’d be no way to take care of themselves and their families. The people must be good stewards of the trees. They cared for the trees and the trees cared for them.

I contrast this with living in Austin.

Here, trees are holy objects, to be hugged and held above all. A large branch falls and critically injures someone in Zilker Park. The city, concerned with public safety, opts to have the trees in the parks reviewed and anything unsafe trimmed or removed. The response? The huggers freak-out, city back-pedals, call for review, many trees that should have been removed due to safety concerns are not removed; around 30 trees were to be removed, but only 5 were due to the outcry. As a result, many unsafe trees remain, and just a short while later one falls but thankfully no one was hurt.

Austin can sometimes be like this:

Yes, I’m fond of capitalism. Yes I like money. Yes I like trees. I understand the importance of trees. If we do not take care of the trees we are only going to hurt ourselves in the long run. We need to have balance, we need to take care of the trees so that the trees can take care of us. The way J. Sterling Morton works it? That’s a lot more reverence for trees than what I see around Austin.

Whispering Pines Bed & Breakfast

The main purpose of the trip to Omaha was to allow my Dad some time with his grandchildren. The plan was for him to take the grandkids for a few days of spoiling. 🙂  Thus, Wife and I had to make ourselves scarce. What to do?

We went to a bed & breakfast.

Some years ago I worked at a company and there met Jeanna Stavas. We hit it off due to our common history with Nebraska. About 5 years ago Jeanna opted to leave the high-tech industry and opened up a B&B called Whispering Pines, in Nebraska City, Nebraska (about an hour drive south of Omaha). I figured that would work out great: let my Dad have the grandkids for a few days and Wife and I spend a little together time at a B&B.

We’ve never done the B&B thing before, and after this experience I think we’ll do it a lot more. It was fantastic.

The Roost

We stayed in “The Roost”, which is an old barn converted to a charming room off from the rest of the house. Everything was quiet, private, and quite nice. The pictures on the Whispering Pines website just do not do the rooms justice, and I think that’s really a limitation of the medium… how can you convey the experience in a picture?

Jeanna was a fantastic host, tending to any needs we had. She even took care of a special request I had to have some of Wife’s favorite flowers already in the room. A little wine, a little cheese, some other treats. Nothing was a problem.

Breakfast. Oh my my my my my. Simply delicious. Gourmet, but not pretentious at all. Fresh fruits, local eggs, veggies from her garden. So so so good.  Oh, and let’s not forget the constant supply of home-made cookies. Mmmm.

Nebraska City itself was pretty cool too. Wife and I actually liked just driving through the town looking at the houses… quite a contrast from your modern tract house subdivisions. Local restaurants like the Timber Room at the Lied Lodge were wonderful. Oh, and Parker’s Smokehouse wasn’t Texas BBQ but it was pretty darn good. Frankly, one nice thing was just seeing the wide variety of trees and other plants, because down in our part of Texas it’s just not as diverse. We also took in the Lewis & Clark Museum, which was really well-executed. Of course, we also did a little shopping, and there were some fantastic little shops down there.

So with all this wonderfulness there has to be a downside somewhere, right? Depends how you look at it. 🙂  We didn’t have great coverage out there, so some phone calls didn’t make it through or would drop. If we were lucky we got AT&T’s Edge network (no 3G at all) but most of the time we had the “o” (GPRS) or “Searching…” or “No Service”. Jeanna does have some Wi-Fi, but the signal doesn’t make it down to The Roost (tho you can get it up at the main house). So, lack of connectivity…. good or bad, all depends how you look at it given your reasons for going to a B&B and how badly your “Internet addiction” is. But it did point out how spoiled I am here in Austin. 🙂

All in all, Wife and I had a fantastic little get-away for a few days, and Jeanna @ the Whispering Pines Bed & Breakfast was at the heart of it all. We look forward to going back.

Sunday Metal – Uncle Tom’s Cabin

OK OK… Warrant. How metal are they? Not very.

But the fact of the matter is, “Uncle Tom’s Cabin” rocks. The lyrical matter isn’t typical “hair band” fluff. It’s pretty guitar-driven. It’s heavy (for Warrant). Has a good hook. It tells a great story. Yeah most of the rest of Warrant’s stuff is shit (it’s fun, but it’s nothing spectacular). But this song is a gem.