From: Satoshi N. <sna...@in...> - 2007-12-24 06:58:47
|
Hi, The value comes from a constant, kABHomeLabel. http://developer.apple.com/documentation/UserExperience/Reference/AddressBook/Classes/ABPerson_Class/Reference/Reference.html Proof: require 'osx/cocoa' include OSX OSX.require_framework "AddressBook" puts KABWorkLabel puts KABHomeLabel puts KABOtherLabel Result: _$!<Work>!$_ _$!<Home>!$_ _$!<Other>!$_ -- Satoshi Nakagawa On 2007/12/24, at 7:04, Patrick Hurley wrote: > This is probably more of a cocoa question than a rubycocoa question, > so feel free to ignore me :-) I am trying to work with address book, > and at least at the moment I am stumped by labels in > AbMultiValueCoreDataWrapper. I expect to see "Home", but I get > "_$<Home>!$_". > > Thanks for any help, pointers to docs, etc. > pth > > > require 'osx/cocoa' > include OSX > OSX.require_framework "AddressBook" > > me = ABAddressBook.sharedAddressBook.me # => > #<OSX::ABPerson:0xbf3d8 class='ABPerson' id=0x514af0> > addr_info = me.valueForProperty("Address") # => > #<OSX::ABMultiValueCoreDataWrapper:0xbf04a > class='ABMultiValueCoreDataWrapper' id=0x51f0e0> > addr_info.labelAtIndex(0).to_s # => "_$!<Home>!$_" > addr_info.identifierAtIndex(0).to_s # => > "E2E83CDE-3FE3-4F89-9EBD-1030C483A6D8" > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Microsoft > Defy all challenges. Microsoft(R) Visual Studio 2005. > http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/ > _______________________________________________ > Rubycocoa-talk mailing list > Rub...@li... > https://lists.sourceforge.net/lists/listinfo/rubycocoa-talk |