• Open Menu Close Menu
  • Apple
  • Shopping Bag
  • Apple
  • Mac
  • iPad
  • iPhone
  • Watch
  • TV
  • Music
  • Support
  • Search apple.com
  • Shopping Bag

Lists

Open Menu Close Menu
  • Terms and Conditions
  • Lists hosted on this site
  • Email the Postmaster
  • Tips for posting to public mailing lists
Re: Accessing members from NSDictionary
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Accessing members from NSDictionary


  • Subject: Re: Accessing members from NSDictionary
  • From: Jens Alfke <email@hidden>
  • Date: Fri, 05 Apr 2013 10:38:36 -0700

On Apr 5, 2013, at 7:03 AM, Pax <email@hidden> wrote:

> Ah, I see. I shall try that out.  And, referring to my earlier question, would I be able to:
>
> [[device objectForKey:@"InformationWindowRef"].infoWindow cascadeTopLeftFromPoint:NSMakePoint(20,20)];

No, because -objectForKey: returns type id, i.e. a generic untyped object reference, but “.” syntax is strongly typed so it requires that the left-hand-side be an actual class that defines that property. Your choices are:

	[[device objectForKey:@"InformationWindowRef”] infoWindow] ...
or
	InfoWindowRef *ref = [[device objectForKey:@"InformationWindowRef”];
	ref.infoWindow ...

—Jens
_______________________________________________

Cocoa-dev mailing list (email@hidden)

Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com

Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden


References: 
 >Accessing members from NSDictionary (From: Pax <email@hidden>)
 >Re: Accessing members from NSDictionary (From: Mike Abdullah <email@hidden>)
 >Re: Accessing members from NSDictionary (From: Pax <email@hidden>)
 >Re: Accessing members from NSDictionary (From: Tom Davie <email@hidden>)
 >Re: Accessing members from NSDictionary (From: Pax <email@hidden>)

  • Prev by Date: Re: cursorUpdate was called, but cursor was not updated
  • Next by Date: Re: Providing a Service without activating an app
  • Previous by thread: Re: Accessing members from NSDictionary
  • Next by thread: Re: Accessing members from NSDictionary
  • Index(es):
    • Date
    • Thread