Hi,

I've been fiddling around with JavaScript.pm, which is very cool, I have to 
say, I've bound a class, and sucessfully bound an object, and i can read 
from the object's properties, and execute it's getter/setter functions, but 
for some reason i cannot get the object's methods to work..

here's a cleaned up version of what i've been testing with:

$js->bind_class(
name=>'Foo',
methods=>{
test => \&Foo::test
},
properties=>{
testy =>{
flags => JS_PROP_READONLY | JS_PROP_ACCESSOR,
getter => \&Foo::test_getter,
}
}
);
my $obj = new Foo();
$js->bind_object('obj', $obj)

(where package Foo has a 'test' method)

...

now in js: 'obj.testy' (the property) works fine, but 'obj.test()' (method) 
just doesn't.. there seems to be no indication that it's successfully bound 
(everything just says it's not defined).. getters and setters work, but 
methods just don't seem to..

Any clues as to what's going on?

Dan

Reply via email to