• 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
protocol/plug-in question
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

protocol/plug-in question


  • Subject: protocol/plug-in question
  • From: "Ryan Glover" <email@hidden>
  • Date: Wed, 5 Apr 2006 20:43:08 -0400

Hello,

I am attempting to create an app that I want to be expandable via
plug-ins.  I have read up on protocols and they seem the right
solution.  It seems clear how I can pull information out of each of
the plug-ins using the methods I have defined in the protocol, but how
do I get to the getter/setters inside of a plug-in to set the plug-in
specific parameters?

Maybe an example will help illustrate what I am trying to ask.

Say I have a mutable array of shape objects.  A type of shape is a
plug in.  All of the shapes return, say, their mass.  So I can loop
through my array and sum total mass.  This will be done by a getMass
method in the protocol.  But each plug-in might have different inputs.
 For example, a cube only needs to know the length of one side while a
cylinder needs to know height and a radius.  If the array is presented
in a table and I click on a particular row in the table (which
represents an instance of a shape) how does the code know what
parameters are applicable?  Do individual instances present a list of
their methods that can be interrogated at run time?

I realize the question is convoluted but I can't seem to fill this gap
in my knowledge.  Any help would be appreciated.

Many thanks,
Ryan Glover
 _______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list      (email@hidden)
Help/Unsubscribe/Update your Subscription:

This email sent to email@hidden

  • Follow-Ups:
    • Re: protocol/plug-in question
      • From: Ondra Cada <email@hidden>
  • Prev by Date: focus / tab order completely messed up
  • Next by Date: Re: protocol/plug-in question
  • Previous by thread: focus / tab order completely messed up
  • Next by thread: Re: protocol/plug-in question
  • Index(es):
    • Date
    • Thread