From: <php...@li...> - 2011-01-18 13:19:43
|
Hi again, I've looked at the java_closure example and others on the web and I'm still having problems - I would be grateful if in addition to the outstanding "this" keyword problem, could you quickly tell me what I am doing wrong with the below simple code: // Simple test method class IEValuator { public function Evaluate(){return 2;} } $tmpIEValuator = new IEValuator; $javaObject = java_closure(new $tmpIEValuator()); The script runs fine with no errors but the third-party Java object "Problem" which looks for a public user defined interface called "IEvaluator" never finds or runs the call-back "Evaluate" method I'm trying to define above - what have I got incorrect? I appreciate you cannot go into coding specifics with third-party classes etc but I think I am not setting up the user defined interface correctly via the JavaBridge/PHP. Thanks again for your help, Marc On 18 Jan 2011, at 09:27, php...@li... wrote: > Hi, > > Thanks for that, I'll read through the java_closure documentation. I'm still at a loss with regards to the equivalent "this" Java keyword - what should I be using as I have tried everything and still cannot find the correct reference to pass into the method. > > Thanks, > > Marc > > On 17 Jan 2011, at 20:42, php...@li... wrote: > >> Hi, >> >> please see our API documentation at: >> >> http://php-java-bridge.sourceforge.net/pjb/docs/php-api/java/_JavaProxy.inc.html#functionjava_closure >> >> Regards, >> Jost Bökemeier >> ------------------------------------------------------------------------------ >> Protect Your Site and Customers from Malware Attacks >> Learn about various malware tactics and how to avoid them. Understand >> malware threats, the impact they can have on your business, and how you >> can protect your company and customers by using code signing. >> http://p.sf.net/sfu/oracle-sfdevnl >> _______________________________________________ >> php-java-bridge-users mailing list >> php...@li... >> https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users > > > Mob: +44 797 329 5617 > > The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. > > > ------------------------------------------------------------------------------ > Protect Your Site and Customers from Malware Attacks > Learn about various malware tactics and how to avoid them. Understand > malware threats, the impact they can have on your business, and how you > can protect your company and customers by using code signing. > http://p.sf.net/sfu/oracle-sfdevnl > _______________________________________________ > php-java-bridge-users mailing list > php...@li... > https://lists.sourceforge.net/lists/listinfo/php-java-bridge-users Mob: +44 797 329 5617 The information contained in this E-mail is confidential. It is intended only for the stated addressee(s) and access to it by any other person is unauthorised. If you are not an addressee, you must not disclose, copy, circulate or in any other way use or rely on the information contained in this E-mail. Such unauthorised use may be unlawful. If you have received this E-mail in error, please inform us immediately and delete it and all copies from your system. |