Mantis Bugtracker

Viewing Issue Simple Details Jump to Notes ] View Advanced ] Issue History ] Print ]
ID Category Severity Reproducibility Date Submitted Last Update
0000346 [Yate - Yet Another Telephony Engine] module feature always 2013-06-27 10:35 2013-07-11 12:11
Reporter folarte View Status public  
Assigned To
Priority normal Resolution open  
Status acknowledged   Product Version SVN
Summary 0000346: Java scripts does not support closures-
Description It seems yate javascript does not support closures. I tested with:

// Test closures:
function clo_test(x,y) {
    return function(z) {
        Engine.output("x =",x,", y =", y,", z =",z);
    };
}

f1=clo_test(1,"a");
f2=clo_test(2,"b");
x='x'; y='y';
f1("c");
f2("d");

And got:

x = , y = , z = c
x = , y = , z = d

Instead of the expected ( tested with Rhino 1.7 ):

js> Engine={'output':print} // To use the same source as yate.
js> f1("c");
x = 1 , y = a , z = c
js> f2("d");
x = 2 , y = b , z = d
Additional Information
Tags No tags attached.
Attached Files

- Relationships

There are no notes attached to this issue.

- Issue History
Date Modified Username Field Change
2013-06-27 10:35 folarte New Issue
2013-07-11 12:11 paulc Status new => acknowledged


Copyright © 2000 - 2008 Mantis Group
Powered by Mantis Bugtracker