Hello Manolis,

> [error]
> BASIC runtime error.
> An exception occurred
> Type: com.sun.star.lang.IllegalArgumentException
> Message: cannot coerce argument type during corereflection call!
> [/error]
> 
> Anyone knows what changed in UNO API to cause this error?

Just guessing ...
This *might* have to do with the Basic feature of not requiring you to
specify the interface at which you call a method. That is, you just
write "object.method", which is fine most of the times, but prone to
failure in case that "object" implements multiple interfaces, of which
at least two have a method called "method".

"addEventListener", in particular, exists at both css.lang.XComponent
and css.document.XEventBroadcaster, both incarnations having a different
signature.

So I assume that the form document implements both interfaces (this is
the part I am pretty sure of), and that something somewhere changed so
that now the Basic runtime is not able to determine which method to call.

I assume that this is worth a bug (in other words: I assume "your Basic
code is broken and worked by luck only in the past" is not a legitimate
reaction on such a bug), since the Basic runtime in fact *should* be
able to determine which method version to call, since the arguments you
give it should make it unambiguous.

When you submit such an issue, component is "scripting", initial owner
is probably AB. Don't forget to set the "regression" keyword.


To work around the problem in your script, try
  form.com_sun_star_lang_XComponent.addEventListener( ... )
, this way making the interface at which the addEventListener method
should be sought explicit.

If this doesn't work ... then perhaps everything I said above is
nonsense ...

Ciao
Frank


-- 
- Frank Schönheit, Software Engineer         [EMAIL PROTECTED] -
- Sun Microsystems                      http://www.sun.com/staroffice -
- OpenOffice.org Base                       http://dba.openoffice.org -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

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

Reply via email to