Hi,

onActivate(Object[]) is always called first because it counts as a method having an infinite amount of parameters, so to speak. At least that's the way I see it.

-Filip

On 2008-04-14 20:40, Szemere Szemere wrote:
I've been playing around with onActivate methods recently, that is with
multiple  parameters and multiple methods. I don't understand its behaviour
- it does not seem to match up with the lore on the mailing lists (apologies
for the lack of references). I was wondering if anyone has recent experience
or a write-up of this - if not I'll post a Wiki page on it.

Specifically, the "lore" says that onActivate methods should be picked first
by alphabetical method name and then by descending number of parameters. On
5.0.11, I find that the first method picked is the safety catch-all
onActivate(Object[] context) irrespective of the name of other methods and
how many parameters they have.

Further I get strange results if I have a method of the form:
onActivate(String firstParameter,Object[] otherParameters)
I expected otherParameters to contain just the other parameters, but in fact
it also contains firstParameter! (not that this isn't useful too).

Any thoughts?

Szemere


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to