Hi All,
why is this not ok?
aContract = function(){};
aContract.prototype = {
someFunction: function() {
alert('yo');
},
someOtherFunction: some$Other$Function
};
var some$Other$Function = function() {
alert('Yo yo yo');
};
var c = new aContract();
c.someFunction();
c.someOtherFunction();
Firebug says c.someOtherFunction is not a function
But this works just fine
aContract = function(){};
aContract.prototype = {
someFunction: function() {
alert('yo');
},
someOtherFunction: some$Other$Function
};
function some$Other$Function() {
alert('Yo yo yo');
};
var c = new aContract();
c.someFunction();
c.someOtherFunction();
What am I missing here??? I prefer to code in javascript using the first method, which usually works fine, but doesn't seem to work correctly when I prototype.
Thanks, ~ck in Sandy Eggo