From: Kieran B. <ki...@br...> - 2001-06-11 18:03:45
|
Can you write a static function in jython? The following code: import java from com.borland.primetime.ide import Browser from com.raelity.jvi import * class jvicom(java.lang.Object): def initOpenTool(majorVersion, minorVersion): "@sig public static void initOpenTool(byte majorVersion, byte minorVersion)" ViManager.addStartupListener(actionPerformed=initStuff) def initStuff(self): ColonCommands.register("com", "command", Browser.ACTION_NavigateBack) Returns the following error under jythonc: 1 .\jpywork\jvicom.java:90: non-static variable this cannot be referenced from a static context PyObject inst = Py.jgetattr(this, "initOpenTool"); ^ Note: .\jpywork\jvicom.java uses or overrides a deprecated API. Note: Recompile with -deprecation for details. 1 error Any info appreciated. |