• 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: Calling getter on const object
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Calling getter on const object


  • Subject: Re: Calling getter on const object
  • From: David Duncan <email@hidden>
  • Date: Mon, 8 Nov 2010 08:29:09 -0800

It might be useful to know what you expect to get from the const reference in the first place? Primarily because I highly suspect that it is not necessary to ensure the semantics that you desire.

On Nov 8, 2010, at 4:59 AM, Jonny Taylor wrote:

> I have encountered what I presume is a common newcomer's problem, but I haven't had any luck with google (maybe I'm using the wrong search terms?). Suppose I have a const id, e.g. "const id<FrameProtocol> frame". If I attempt to call a getter for the object I get the following compiler error:
> request for member 'frameNumber' in 'frame', which is of non-class type 'objc_object* const'

--
David Duncan

_______________________________________________

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

  • Follow-Ups:
    • Re: Calling getter on const object
      • From: Jonny Taylor <email@hidden>
References: 
 >Calling getter on const object (From: Jonny Taylor <email@hidden>)

  • Prev by Date: Re: Synchronizing iOS redraw
  • Next by Date: Re: CATransaction setCompletionBlock - Nested Transactions bug?
  • Previous by thread: Calling getter on const object
  • Next by thread: Re: Calling getter on const object
  • Index(es):
    • Date
    • Thread