From: Abbett, J. <Jon...@ch...> - 2005-12-13 15:37:45
|
Greetings all... Unfortunately, I have another question about how to pass a variable without it being converted by the Bridge into something unexpected. I have a method that accepts a small-b "boolean" as its only argument. I've tried a few different strategies, but the variable I provide always ends up a "java.lang.Boolean," and causes a NoSuchMethodException. Here's what I've tried: // getBoolean returns a boolean primitive $boolean_class =3D new java_class('java.lang.Boolean'); $object->setValue($boolean_class->getBoolean('true')); ---- $object->setValue(0); ---- $object->setValue(true); ---- // booleanValue() returns a boolean primitive $boolean =3D new java('java.lang.Boolean', 'true'); $object->setValue($boolean->booleanValue()); --- $object->setValue((boolean)'true'); No luck with any of them. Suggestions? Thanks! Jon Abbett =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D Jonathan Abbett Children's Hospital Informatics Program 1 Autumn Street, Fifth Floor Boston, MA 02215 617-355-8334 http://www.chip.org |