Archives / Search ›

Received my second replacement Sidekick from T-Mobile today, which
arrived in the open position, complete with incredibly scratched-up
screen—far worse than the screen on the original device I've
been using for the past seven months. I wrote about the broken first replacement
last week. It's going back in the morning.

Not only does Apple's own Safari Web browser not auto-fill the password in Apple's own bug reporter pages, but the bug reporter timed out after far less than the stated 60-minute timeout. At least Safari didn't crash thereafter, sending my bug into oblivion.

Definitely a sign that it's time to go home and sleep.

I wanted to write a script to eject my iPod from the keyboard, since the multi-step process with iTunes was a bit convoluted and my desktop is often obscured. But first, I downloaded Apple's iPod Scripts which happily included such a script. I ran the script, and it crashed:

 #0   0x9022e158 in FSRefLookupMount(FSRefPrivate const*)
 #1   0x00000000 in 0x0
 #2   0x902309b4 in PBGetCatalogInfoBulkSync
 #3   0x90243518 in FSGetCatalogInfoBulk
 #4   0x03092b18 in AEVTearslfdr(AEDesc const*, AEDesc*, unsigned long)
 #5   0x91b56570 in aeDispatchAppleEvent(AEDesc const*, AEDesc*, unsigned long, unsigned char*)
 #6   0x91b5a8e4 in sendToSelf(AEDesc const*, AEDesc*, long, long)
 #7   0x91b58124 in AESendMessage

AppleScripts are meant to do many wonderful things, notably not including crashing the host application. I gave up at the time, but when I found the same problem in the “Create Note from Clipboard” script from which I'm borrowing to write my Palm Desktop note/memo sync script, I tracked the problem down to this handler:

on locate_iPods()
   
set the volumes_directory to/Volumes/as POSIX file as alias
   
set the volume_names to list folder volumes_directory without invisibles
   
set mounted_iPods to {}
   
repeat with i from 1 to the count of volume_names
      
try
         
set this_name to item i of volume_names
         
set this_disk to (“/Volumes/” &this_name & “/“) as POSIX file as alias
         
set these_items to list folder this_disk
         
ifiPod_Controlis in these_items then
            
set the end of the mounted_iPods to this_disk
         
end if
      
end try
   
end repeat
   
return mounted_iPods
end locate_iPods

The above seemed like an awful lot of work to list the mounted disks. Somehow I've got an 82-byte file named “._Nikon_photo” (the volume name of my camera's CompactFlash card) in my /Volumes directory, and since the AppleScript definition of “without invisibles” doesn't include UNIX “dotfiles” such as this one, it showed up in the mounted volume list. The “list folder” scripting addition, annoyingly, crashed when it was asked to list something that wasn't a folder, and that was that.

The weird thing is that, listed right about the “list folder” script addition is “list disks”, which allows you to simplify the script to the following:

on locate_iPods()
   
set mounted_iPods to {}
   
repeat with this_disk in list disks
      
set these_items to list folder (this_disk as alias)
      
ifiPod_Controlis in these_items then
         
set the end of the mounted_iPods to (this_disk as alias)
      
end if
   
end repeat
   
return mounted_iPods
end locate_iPods

This version of the handler has the advantages of being easier to read, and not crashing. All the iPod scripts have this handler in them, so just copy and paste the above into them.

Of course, I can't find anywhere to send feedback for the scripts. Hence this weblog entry, in the hope that someone, somewhere will read it.

My iPod arrived today, three days earlier than expected.



So much work to do, though, in organizing my music, which was split among three computers and my 3.5″ FireWire hard drive. Having 30 GB in a space smaller volume-wise than I used for 128 MB with my Nomad II will take some getting used to.

These days it doesn't take much to get me laughing.

00:05  ilister> so I guess still nobody wants to provide appropriate hardware 
                to help test my antenna?
00:07  bradyt> i might want to, but am actually unable
00:11  Rugle> <Rugle's Dad>  I cna't understand why people eat rice. It can't 
              be good for you. We live next to a continuent where everyone 
              easts rice. They then hop in boats and come to Oz. Many die along 
              the way.
00:11 @sabi> hahaha.
00:12 @Iain> huh?
00:14 @Iain> so what's wrong with rice?
00:14  Rugle> just random conversation :)
00:18 @Iain> oh
00:19  nandi> oook
00:20 @sabi> Oook!
00:22  Rugle> nonono
00:22  Rugle> you want ook++
00:22  Rugle> ook's -nothing- without objects..
00:23 @sabi> Hehe.
00:23 @sabi> I didn't know there was an OO Ook.
00:24 @sabi> Oh, there isn't. :P
00:24 @Iain> ook!
00:24  ilister> bah, you don't need the syntactic sugar in ook++ just to do OO
00:24 @sabi> rofl.
00:24 * nandi bangs her head on the desk
00:25  nandi> Iain: and you think *i'm* a geek
00:25  ilister> we're all geeks
00:25  ilister> that's why we're here
‹ Newer Posts  •  Older Posts ›