• 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: Question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Question


  • Subject: Re: Question
  • From: Marcel Weiher <email@hidden>
  • Date: Tue, 4 Dec 2001 09:34:29 +0100

On Dienstag, Dezember 4, 2001, at 03:37 Uhr, Eduardo I. Jiminez wrote:

Now, back to the point. Sure, I could fix the problem by coding a composite object (can't use protocols because protocols cannot inherit from classes, right?)

They're not supposed to inherit from classes...classes are implementation-level artifacts, protocol are type-system level artifacts.

You can include one protocol in another: @protocol A <B>

This means that all fo the messages in protocol B are also in protocol A.

with an union of both superclasses' interfaces, forwarding calls to a couple of objects that represent each state of the multiple superclass object, right?. However, this way I would not gain type equivalence, having to use "id" as parameter type whenever I need to receive an object like this one.

You use the protocols for the typing aspect. You simply reference the other objects and adopt the protocols that you are forwarding.

Marcel

--
Marcel Weiher Metaobject Software Technologies
email@hidden www.metaobject.com
Metaprogramming for the Graphic Arts. HOM, IDEAs, MetaAd etc.


References: 
 >Re: Question (From: "Eduardo I. Jiménez" <email@hidden>)

  • Prev by Date: Re: Question
  • Next by Date: stripping /Contents/MacOS
  • Previous by thread: Re: Question
  • Next by thread: Re: Question
  • Index(es):
    • Date
    • Thread