I updated the Find Email Address in Address Book command from last year[1] to use RubyCocoa and the AddressBook framework. It seems a lot faster than using contacts or lbdb, and unlike AppleScript it works when the Address Book is closed.
I tried changing the menu to use TextMate::UI.menu, but tm_dialog just hangs... I guess there's some sort of OSX namespace conflict going on?
On 9 Dec 2007, at 14:53, Grant Hollingworth wrote:
I updated the Find Email Address in Address Book command from last year[1] to use RubyCocoa and the AddressBook framework. It seems a lot faster than using contacts or lbdb, and unlike AppleScript it works when the Address Book is closed.
This is very neat :) When we ditch Tiger compatibility I definitely want it in the Mail bundle.
I tried changing the menu to use TextMate::UI.menu, but tm_dialog just hangs... I guess there's some sort of OSX namespace conflict going on?
That would seem likely, although only the plist library uses that namespace, and you already include that.
Excerpts from Allan Odgaard's message of Tue Dec 11 01:34:32 -0500 2007:
This is very neat :) When we ditch Tiger compatibility I definitely want it in the Mail bundle.
Right... I should have pointed out that it needs 10.5, or for RubyCocoa to be installed manually.
The big problem with the command is that it doesn't like UTF-8 strings. I'm not sure if the problem is in Ruby, or RubyCocoa, or the AddressBook framework. It doesn't help that irb dislikes accented characters unless I use --noreadline, which is painful.
On 11 Dec 2007, at 18:48, Grant Hollingworth wrote:
[...] The big problem with the command is that it doesn't like UTF-8 strings. I'm not sure if the problem is in Ruby, or RubyCocoa, or the AddressBook framework. It doesn't help that irb dislikes accented characters unless I use --noreadline, which is painful.
How does this manifest itself? I have a contact with an ‘æ’ in his middle name and I can loookup based on his middle name or his first name, and in both cases, I get the proper result.
Excerpts from Allan Odgaard's message of Tue Dec 11 12:56:01 -0500 2007:
How does this manifest itself? I have a contact with an ‘æ’ in his middle name and I can loookup based on his middle name or his first name, and in both cases, I get the proper result.
Interesting. 'æ' works for me, too. Other accented characters I tried (ë, é, å) worked, *unless* they were the last character in the name.