|
I am still in the dark on how I define method to/in an private scope?
I tried to play around with the following source but couldn't get to work.
Any hint or better a solution would be appreciated and solve for me another part in the javascript 'puzzle'.
var Headline = Class.create();
Headline.prototype = {
initialize: function() {
this.responseText = '';
this.isAtttachedUploadRemoved = false;
},
getResponseText: function () {
if(this.isAttachedUploadRemoved) {
return this.responseText;
}
},
removeAttachedUpload: function(uploadId, headlineId) {
alert('Call to remove method with '+ uploadId + ' ' + headlineId);
this.setAttachedUploadRemoveStatus(true);
this.responseText = 'blah 2006';
},
/** this method should be private
* so I can make private calls i.e. in the removeAttachedUpload method and not from the
* outer scope
*/
setAttachedUploadRemoveStatus: function (status) {
this.isAtttachedUploadRemoved = status;
}
}
|