Computers: July 2006 Archives

Replacement iBook Keyboard

| | Comments (0)
Three and a half years ago, I had a bad PowerBook G4 -- kept freezing up -- and Apple, in a vain attempt to fix the problem, sent me a new keyboard. It didn't help. But I kept the keyboard, as I keep most such things, fairly organized in large Rubbermaid boxes.

Last night my wife's iBook, from the same era as the PowerBook, just had its keyboard begin to go bad. And it turns out my TiBook 15" keyboard is the same size and has the same cable as the snow 12" iBook. The tabs at the bottom to hold it in are different, but a snip here, a bend there, and I got it to fit in. There's a slight bulge in the middle, as the ribbon cable is a bit longer. Other than that, it is fine. And it looks cool.

Mac::Carbon on Intel

| | Comments (0)
Feel free to download my talk on porting Mac::Carbon to Intel.
Holdonasec. The only prejudice I see here is coming straight from TorgoX.

Now Playing: Blues Traveler - Canadian Rose

Re: President Fredo Corleone

| | Comments (0)
Heh, so TorgoX says Bush should be impeached for directing Cheney to counter Joe Wilson's statements.

Two problems.

First, even if you disagree with what Bush did, nothing he did in this was remotely impeachable. What was actually done? He released the Iraq NIE -- something that most people wanted released, including antiwar Democrats and the press -- to counteract claims made by Wilson. How is this worthy of impeachment?

Second, what Wilson said was actually false, in a few ways, but most importantly, in that the British intelligence Bush based the "16 words" on in his 2003 State of the Union speech was from completely separate intelligence than anything Wilson had any knowledge about. Wilson kept claiming he showed Bush's WMD claims were false, except that he had no actual knowledge or evidence that this was the case, since the only stuff he knew about wasn't actually being used in the claims.

So how does this amount to impeachment: doing something completely innocuous in order to show that someone who was wrong, was wrong? I can't figure it out. I am blinded by facts.
I hate that the Mac likes to put styled text on the clipboard and use it everywhere. Like when I am in Safari, I ctrl-click a link and select "Copy Link," and I get styled text of the link text that is hyperlinked. I do not want that. I want the link. So I have to paste it into Safari or BBEdit, then select it and copy it again, so I can paste it into iChat without being retarded.

And I don't care if you like it that way! I don't.

So I figured I'd use this simple AppleScript:

set the clipboard to (the clipboard as string) as string

It seemed to work, except that it still carried some text style information in it. I have no idea why. So I tried the equivalent Perl version:

use Mac::Glue ':all';
my $glue = new Mac::Glue 'Finder';
$glue->set_the_clipboard_to($glue->the_ clipboard(as => 'string'));

That works. Why?

The returned Apple event does not return merely the text, but a record containing text and some default style information. The Mac::Glue version knows you want the text and sucks that part out, but the AppleScript version keeps the style information for you. Once I figured this part out, it was a matter of duplicating that behavior in AppleScript (I could leave it in perl, but the perl version can take a couple of seconds, and I'll be putting this in the Script Menu and calling it regularly to clean my clipboard).

So here's the final version, which first converts the returned clipboard value to a record, then extracts the key containing the text:

set the clipboard to «class ktxt» of ((the clipboard as string) as record)

Mac-Glue-1.27 Released

| | Comments (0)
Mac-Glue-1.27 has been released. Download it from the CPAN or

(Note: it may take time for the release to propagate to the various download mirrors.)

* v1.27, Tuesday, July 6, 2006
   Endian fix for typeLongDateTime.

Posted using release by brian d foy.

Mac-Carbon-0.77 Released

| | Comments (0)
Mac-Carbon-0.77 has been released. Download it from the CPAN or

(Note: it may take time for the release to propagate to the various download mirrors.)

* v0.77, 6 July 2006
   Add typeAbsoluteOrdinal to ConvertFourCharCode() types for Intel Macs
   Add SpeechToFile() to Mac::Speech, to allow outputting speech to an AIFF file
   Remove unnecessary dependency in Alias.t

Posted using release by brian d foy.
Mac-AppleEvents-Simple-1.18 has been released. Download it from the CPAN or

(Note: it may take time for the release to propagate to the various download mirrors.)

* v1.18, Thursday, July 6, 2006
   Endian fix for typeLongDateTime.

Posted using release by brian d foy.

Rquest for Intel Mac Help

| | Comments (0)
I no longer have access to an Intel Mac. I got a bug report, and I need help.

  • Install latest (as of a week or so ago) versions of some modules: Mac::Glue, Mac::Apps::Launch, Mac::AppleEvents::Simple, and Mac::Carbon (in reverse order of normal installation).
  • Install two small shell scripts, aedebug and glue.
  • Create a glue for iCal ("sudo gluemac /Applications/")
  • Run this one-liner script:

    aedebug glue iCal '$x = $g->obj(event => gAny, calendar => gAny)->get; print $x->prop("summary")->get; my $t = $x->prop("start date")->get; print $t; print scalar localtime $t'

Then send me the entire output (there will be quite a bit of debugging output), either here (use the "Code" posting format), or via e-mail.


Update baud helped me out, so now I have a proper diagnosis of the problem, and I don't need further assistance for now. He also helped me uncover another problem that my test case here exposed, that was not in the original. W00t.
<pudge/*> (pronounced "PudgeGlob") is thousands of posts over many years by Pudge.

"It is the common fate of the indolent to see their rights become a prey to the active. The condition upon which God hath given liberty to man is eternal vigilance; which condition if he break, servitude is at once the consequence of his crime and the punishment of his guilt."

About this Archive

This page is a archive of entries in the Computers category from July 2006.

Computers: June 2006 is the previous archive.

Computers: August 2006 is the next archive.

Find recent content on the main index or look in the archives to find all content.