protocol/plug-in question
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