Dan Wood is co-owner of Karelia Software, creating programs for the Macintosh computer. He is the father of two kids, lives in the Bay Area of California USA, and prefers bicycles to cars. This site is his weblog, which mostly covers geeky topics like Macs and Mac Programming.
Useful Tidbits and Egotistical Musings from Dan Wood
Categories: Mac OS X · Cocoa Programming · General · All Categories
permanent link
· Topic/MacOSX
|
Recently I listed some of the features from Apple's list of new Tiger features that I wanted to talk about. Well, now I can. So here are some followups to that post.
permanent link
· Topic/Cocoa
|
As most modern developers know, a great way to save time when building an application is to stand on the shoulders of others, by making use of open-source/free software that is all around. You see if somebody else has already solved your problems in a general way, and incorporate their software libraries into your application. Ideally, you give a little back to the community and perhaps contribute something of your own for others to use.
I wanted to highlight a great Cocoa UI addition — or rather, replacement — that we are using in our forthcoming application. It's RBSplitView, a replacement for the not-keeping-up-with-the-times NSSplitView class. Its developer, Rainer, has been extremely helpful by making this class available, and responding to feature requests to enable developers to make more "modern" software. If you want a better split view, check this class out!
permanent link
· Topic/MacOSX
|
More people who read this weblog are probably aware of the "Meet the Engineers Behind Tiger" (Really, Managers) feature at Apple than realize that there's a new Pope (and the guy they chose was not my first choice).
Many of you have probably spend most of the last year worshipping these fine men as heroes ... but only now, here is your opportunity to be them.
How is that possible? you might ask. Well, thanks to the magic of iChat, you can change your online looks — and accompanying personality — at the drag of a mouse. Do you want to be French when you look your friends in the eye? Become Bertrand! Getting ready for a long hike in the Sierras? Let Ted Goldstein be your inspiration! Want to be seen in uber-cool spectacles? Your friends can envision you as Peter "Graphics" Graffagnino! Feeling like you need some pep in your life? Let Scott be your guide! (Plus, it's cheaper than coffee!)
Download the whole set here, or just drag an individual image from here to your iChat "Buddy List" window. Taa-daa!
(Thanks to Terrence for the unintentional idea!)
permanent link
· Topic/Politics
|
Here's a smaller report on day 2 of the California Democratic Convention.
permanent link
· Topic/Politics
|
Yesterday was the first day of the 2005 California Democratic Convention, and as hoped, I am able to blog a bit, in an attempt to share the experience with readers who, like myself only a few months ago, are hardly aware of such an event like this taking place.
permanent link
· Topic/MacOSX
|
Anybody reading this weblog is probably aware that Mac OS X 10.4 "Tiger" due out very soon. As a developer, I've been able to use the prerelease versions of the OS, but I'm also unable to talk about it. Now that Apple has released a big list of new features, I thought I would highlight the items from their list that I would express my enthusiasm for, if I could:
Of course there are lots of little odds and ends from Apple's list that I will probably find handy. Notice the big feature that is absent from my list: Dashboard. I know it's what most users are excited about, but yawn. (Sorry, Dori!)
permanent link
· Topic/Politics
|
I haven't posted much about politics since the electoral debacle of last year. I was depressed with the outcome, and frustrated that all of the hope that so many of us had back then went up in smoke, and frustrated that in spite of the energy of the movement to take our country back, we still had a Democratic Presidential Candidate/Campaign who was pretty much the typical story. So I, along with a whole bunch of others, decided it was time to try to do something about it. I actually joined the Democratic Party (I had been independent) and got myself elected to being one of the delegates representing my assembly district here in California. And this weekend, I will be going to the California State Democratic Convention.
A lot of people who go to these things are entrenched old-timers and are happy to be members of this club, even if it means being on the losing team all the time. But a bunch of people like me are new at all this, and have to figure out what the heck is going on, but are also there to ask some hard questions and challenge the way things are currently run in the "Wobblycrats" party.
If I have computer access, I will blog a bit about what's going on here. This process is part of the way that citizens can have some say in the way this country is run, and I feel that so far, it's been quite an "insider's club." (Most people I talk to haven't even heard of all the state conventions, the assembly districts, the delgates, etc., and it took a lot of digging to figure out what it's all about.) Just as weblogs had a big impact on last year's elections, I think they can continue to have an impact by making transparent more aspects of our government ... seeing where the party platforms and positions come from, where the candidates get their start, and so forth.
If anybody has any questions about what the convention is about or what happens there, please feel free to leave them in the comments. (Please, no flames from Republicans — you are having your turn in office now, so lighten up.)
permanent link
· Topic/Cocoa
|
Our project uses Cocoa Bindings extensively. This works great, except for when you have a bug. For instance, you might have something defined in your nib file that doesn't correspond to anything in your model object. At runtime, you end up with a crash deep in the bowels of the bindings system, with nothing to help you find your way out other than the stack trace which looks like binding-related code of Apple's. It's completely opaque, of course — you can't tell what was happening between your code line that was running (say, loading a nib file) and where it has crashed.
There needs to be a way to tell what is going on. Maybe a way to log accesses, or a way to view the parameters being passed around when hunting through the stack traces in XCode's debugger. I've found a few clues from time to time, but usually it's a lot of work to figure out what went wrong.
Are there any fellow Cocoa developers using Bindings who have come up with tricks and techniquest for diagnosing bindings gone wrong?
permanent link
· Topic/Politics
|
I've was following the Terri Schiavo case a bit ... not for the tragedy that it was already, but for the way that it has been turned into such a political issue.
I read recently that a memo circulated among Senators to help Republicans politicize Terri Schiavo's case was recently proved as being real, and not faked as Republicans claimed.
I was curious to read the memo, which ABC first reported, so I did some googling. I found a reference to it on ABC's site. What is interesting is that the full text, which used to be on their, is not there anymore. The story has been changed. Is it standard to change an existing news story?
Here's the scoop. Do a Google search for schiavo memo full text and the top hit is titled "ABC News: GOP Talking Points on Terri Schiavo". If you click on the cache for the story, you see a story called "GOP Talking Points on Terri Schiavo". But if you actually go to the link itself, you get a different, but related, story, titled "Senator Says His Aide Wrote Terri Schiavo Memo".
I'm not suggesting there's any conspiracy to hide the original story, but it seems a bit weird, doesn't it?
FWIW, for posterity's sake, here's the full text of the Schiavo memo (boldfacing emphasis mine), from Google's cache:
S. 529, The Incapacitated Person's Legal Protection Act
Teri (sic) Schiavo is subject to an order that her feeding tubes will be disconnected on March 18, 2005 at 1p.m.
The Senate needs to act this week, before the Budget Act is pending business, or Terri's family will not have a remedy in federal court.
This is an important moral issue and the pro-life base will be excited that the Senate is debating this important issue.
This is a great political issue, because Senator Nelson of Florida has already refused to become a cosponsor and this is a tough issue for Democrats.
The bill is very limited and defines custody as "those parties authorized or directed by a court order to withdraw or withhold food, fluids, or medical treatment."
There is an exemption for a proceeding "which no party disputes, and the court finds, that the incapacitated person while having capacity, had executed a written advance directive valid under applicably law that clearly authorized the withholding or or (sic) withdrawl (sic) of food and fluids or medical treatment in the applicable circumstances."
Incapacitated persons are defined as those "presently incapable of making relevant decisions concerning the provision, withholding or withdrawl (sic) of food fluids or medical treatment under applicable state law."
This legislation ensures that individuals like Terri Schiavo are guaranteed the same legal protections as convicted murderers like Ted Bundy.
permanent link
· Topic/General
|
Following up on my earlier post, here is a nice Google Sightseeing site.
permanent link
· Topic/Cocoa
|
The technique I posted to prevent caching isn't all it's cracked up to be. If you are loading via -[WebFrame loadHTMLString: baseURL:] then it won't work. The included file is cached by WebCore and there is no way to get around it. Well, they have filed a bug report (#4082386), at least.
permanent link
· Topic/Cocoa
|
When I have a development "stumper", I first search around on CocoaBuilder and CocoaDev to see if anybody else has asked and answered the same question. Most of the time, I can find the answer there. Or I can try posting a question to the lists, or asking around of some developers I know. When all else fails, and I really need help, I use up one of the technical support incidents that comes with my Apple Developer Connection membership. These don't come cheap, so they are a last resort.
I've lately been doing some development with WebKit to display some HTML, and I've been looking for a way to prevent the display of a page from caching the files that it includes (images, stylesheets, javascript files, etc.). Normally caching is fine, but if I'm planning on changing the contents of a file that the page request includes and then reloading the page, the newly-changed file is ignored.
So I punted and asked Apple. And since it's a generic solution, maybe other developers can make use of this little tidbit. So I'm sharing it here.
permanent link
· Topic/General
|
Google Maps added satellite imagery to their site. Very good quality, too. Here are some cool U.S. places to see from above:
Any other interesting sites to "google" from way up high? Add your links in the comments...
permanent link
· Topic/MacOSX
|
I've been making use of Apples "Pages" program for some personal projects lately. It's a more or less useful application, but one thing that drives me batty: It forces me to enter my registration information every time I launch the program.
Could this be a bug, or a new design decision by Apple to stem piracy?
In other aspects, the program is fairly usable, though a few aspects of it drive me nuts. It is more of a word processor than a page layout program, meaning that it's not very good at filling up a fixed number of pages. The way that it automatically creates and removes pages to fit the content is annoying to say the least. Often, when there are graphics or text boxes placed "above" the flow of text, they whimsically jump from page to page, or sometimes not so whimsically, disappear altogether from the document (and then maybe reappear later as new pages get added).
I do like the instantaneous text-wrapping feedback the program provides as you move objects around on a page. Being able to rotate text and graphics is great. The layout and column mechanisms are fairly intuitive after a little practice. It certainly behaves like a "modern" application. But I am sure it could use a little optimization: occasionally the program gets s...l...o...w even when running on a dual-processor G5. I pity user of legacy hardware trying to do anything complex on this program! Hopefully the Pages team will be motivated to speed up the program as the iPhoto team did.
The feature I would most like to see would be handling of documents with half-sheet-sized facing pages that print side-by-side on the same printed sheet. In such a case, the cover page and the back page would go side by side on the sheet; the inside-front and inside-back pages would go side by side, etc. This would save people the tedious work of physical cut and paste, or, as I'm doing, printing each page to a PDF and then placing the images side by side on a new document sized for a full paper sheet.
permanent link
· Topic/Cocoa
|
One "benefit" to being in the Apple developer program is their monthly mailings of CDs (and now, quarterly, DVDs). Back in the old days (Anybody remember Phil and Dave's Excellent CD and all the other silly titles?) the CDs were incredibly useful, chocked full of sample code, SDKs, online documentation, system software, and so forth.
Today, these CDs/DVDs are totally useless. Every few months, I open one up and check out the contents. And you know, there's nothing there that I can't download from the Internet — and probably get a newer version, too. And I laugh when I get a "seed" version of whatever OS is currently in development; by the time it gets to me, I've already downloaded, burned, and installed a much newer version!
So part of my fees to the developer program goes to fund this completely wasteful endeavor that should have been phased out in the late nineties. So thirteen giant non-recyclable Tyvek envelopes get thrown away, along with twelve CDs and four quarterly DVDs that sit on my shelf and accumulate dust until I get sick of seeing them, too.
Does anybody with Internet access actually find these CDs useful?