[MacRuby-devel] Fail to access kABFirstNameProperty

Matt Aimonetti mattaimonetti at gmail.com
Sat Jan 15 19:26:42 PST 2011


Constants in Ruby start by an uppercase, rename kABFirstNamePropery => KABFirstNamePropery

Also I have an address book example in my book you can see freely online.

- Matt

Sent from my iPhone

On Jan 15, 2011, at 19:24, Daniel Lopes <danielvlopes at gmail.com> wrote:

> Hello,
> 
> I'm playing with AddressBook framework but I can't figure how access the predefined constants.
> 
> For example, in my ViewControler I do like below but XCode can't find kABFirstNamePropery. I already added framework 'AddressBook' in my rb_main.rb:
> 
>   def awakeFromNib
>     notificationCenter = NSNotificationCenter.defaultCenter
>     notificationCenter.addObserver(self, 
>                                    selector: "recordChanged:",
>                                    name: ABPeoplePickerNameSelectionDidChangeNotification,
>                                    object:peoplePicker)
>   end
>   
>   def recordChanged(notification)
>     people = peoplePicker.selectedRecords
>     person = people.first
>     puts kABFirstNameProperty
>   end
> 
> 
> Anyone can help me with this issue?
> 
> Thanks in advance ;)
> _______________________________________________
> MacRuby-devel mailing list
> MacRuby-devel at lists.macosforge.org
> http://lists.macosforge.org/mailman/listinfo.cgi/macruby-devel
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macruby-devel/attachments/20110115/1706ed4e/attachment-0001.html>


More information about the MacRuby-devel mailing list