groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ocs@ocs.cz" <...@ocs.cz>
Subject dispatched can't find a method, offers the very same one?!?
Date Tue, 20 Sep 2016 19:44:30 GMT
Hello there,

does anybody understand how the following code:

===
package cz.ocs.model
class DatabaseContextDelegate extends ERXDatabaseContextDelegate {
    NSDictionary databaseContextShouldUpdateCurrentSnapshot(EODatabaseContext dbCtxt, NSDictionary
dic, NSDictionary dic2, EOGlobalID gid, EODatabaseChannel dbChannel) {
      for (def cl=dic.getClass();cl;cl=cl.getSuperclass()) println "DIC inheritance: $cl"
      for (def cl=gid.getClass();cl;cl=cl.getSuperclass()) println "GID inheritance: $cl"
      def nd=super.databaseContextShouldUpdateCurrentSnapshot(dbCtxt,dic,dic2,gid,dbChannel)
// this is line 57
      ...
===

could yield the result of

===
DIC inheritance: class com.webobjects.eocontrol._EOMutableKnownKeyDictionary
DIC inheritance: class com.webobjects.foundation.NSMutableDictionary
DIC inheritance: class com.webobjects.foundation.NSDictionary
DIC inheritance: class java.lang.Object
GID inheritance: class com.webobjects.eocontrol._EOIntegralKeyGlobalID
GID inheritance: class com.webobjects.eocontrol.EOKeyGlobalID
GID inheritance: class com.webobjects.eocontrol.EOGlobalID
GID inheritance: class java.lang.Object

groovy.lang.MissingMethodException: No signature of method: cz.ocs.model.DatabaseContextDelegate.databaseContextShouldUpdateCurrentSnapshot()
is applicable for argument types: (com.webobjects.eoaccess.EODatabaseContext, com.webobjects.eocontrol._EOMutableKnownKeyDictionary,
com.webobjects.eocontrol._EOMutableKnownKeyDictionary, com.webobjects.eocontrol._EOIntegralKeyGlobalID,
com.webobjects.eoaccess.EODatabaseChannel) values: [com.webobjects.eoaccess.EODatabaseContext@22680f52,
[creator_id:<com.webobjects.foundation.NSKeyValueCoding$Null>, ...], ...]
Possible solutions: databaseContextShouldUpdateCurrentSnapshot(com.webobjects.eoaccess.EODatabaseContext,
com.webobjects.foundation.NSDictionary, com.webobjects.foundation.NSDictionary, com.webobjects.eocontrol.EOGlobalID,
com.webobjects.eoaccess.EODatabaseChannel)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.unwrap(ScriptBytecodeAdapter.java:58)
	at org.codehaus.groovy.runtime.ScriptBytecodeAdapter.invokeMethodOnSuperN(ScriptBytecodeAdapter.java:134)
	at cz.ocs.model.DatabaseContextDelegate.databaseContextShouldUpdateCurrentSnapshot(DatabaseContextDelegate.groovy:57)
...
===

? I must say I am sort of outta ideas, for

(a) I can't see why no signature of “cz.ocs.model.DatabaseContextDelegate.databaseContextShouldUpdateCurrentSnapshot”
-- it should be searched for in the superclass (“ERXDatabaseContextDelegate”), should
it not?

(b) how on earth can it complain that the method does not exist and at the same moment as
a possible solution offer it, with a proper signature (this is why I log out those inheritances
to be sure)?

Thanks,
OC


Mime
View raw message