Hello Jon,
Saturday, January 06, 2001, 5:09:06 AM, you wrote:
JS> on 1/5/2001 4:00 PM, "Diethelm Guallar, Gonzalo"
JS> <[EMAIL PROTECTED]> wrote:
>> This will probably prove I'm clueless... anyway...
>>
>> File ActionLoader, method exec(), does this:
>>
>> getInstance(name).perform(data);
>>
>> Method getInstance() returns an object of class
>> Action. This class declares method perform as:
>>
>> protected void perform( RunData data )
>> throws Exception;
>>
>> Stupid question: how can ActionLoader invoke method
>> perform() over an Action object, if this method is
>> declared a protected? Shouldn't it be accessible only
>> to class Action and all its descendants?
JS> Exactly. It is. Your class will be a descendant of the Action class and
JS> therefore you don't have permission problems.
>> I realized this when trying to change the invocation
>> to a method passed as a String parameter. When trying
>> to reflect the default method name ("perform"), I
>> get an exception NoSuchMethod.
JS> Keep digging a bit. We may have to make this stuff not be protected in order
JS> to get what you want.
We have met this problem also. Present situation with protected
methods means that there can be only one way to execute Action -
through ActionLoader, because they are in the same package.
But in order to make Multi-Application behavior for us it was necessary
to have alternative mechanism of executing Action.
So, we solved this problem by creating subclass of Action which only
overwrites protected methods with public. After that we forced all actions in our
applications to subclass this new base Action.
So, if you change protected to public it would mean that
alternative ways of executing Action will be easy to implement on the
base level, without unnecessary subclassing.
-------
The same is with all other modules - Screen, Navigation, Layout, Page.
/ Shamil
------------------------------------------------------------
To subscribe: [EMAIL PROTECTED]
To unsubscribe: [EMAIL PROTECTED]
Search: <http://www.mail-archive.com/turbine%40list.working-dogs.com/>
Problems?: [EMAIL PROTECTED]