cocoon-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "lingerer huang" <lingererhu...@hotmail.com>
Subject [Help]How to upgrade my Flowscript code
Date Mon, 25 Dec 2006 11:08:35 GMT

HI,cocooners:
    After cocoon 2.1.10 release,the js_rhino is alse change.I found this
change break many my flowscript code.I want to upgrade my code to make it
run well under 2.1.10 and versions before 2.1.10.I need some help to
complete it.
    1.Exception
	In 2.1.9,I can do this:
	try{
		....
	}catch(e){
		myexceptionProcessor.process(e);
	}
	this wouldn't work in 2.1.10 because e is not Exception now ,it is
org.mozilla.javascript.NativeError now.
       Questions:
	How can I judge whether e is a Exception or NativeError?
	If e is NativeError,how can I get the original Exception?

    2.Class cast in Java
      In 2.1.9 I can do this in Java:
	myobj = (MyClass) cocoon.jsFunction_getComponent(MyClass.ROLE);
      In 2.1.10 the return is org.mozilla.javascript.NativeJavaObject
      Questions:
	How can I get the original Object?

Thanks.


Roy Huang


Mime
View raw message