Bug message: uncaught exception: text can not be null, line:0, : fixed.

This commit is contained in:
Paulo Gustavo Veiga
2012-09-01 10:17:15 -03:00
parent 00829bfcc4
commit c4f4756e4a
3 changed files with 36 additions and 35 deletions

View File

@@ -17,17 +17,18 @@
*/
mindplot.model.NoteModel = new Class({
Extends: mindplot.model.FeatureModel,
initialize : function(attributes) {
Extends:mindplot.model.FeatureModel,
initialize:function (attributes) {
this.parent(mindplot.model.NoteModel.FEATURE_TYPE);
this.setText(attributes.text);
if (attributes.text)
this.setText(attributes.text);
},
getText:function() {
getText:function () {
return this.getAttribute('text');
},
setText : function(text) {
setText:function (text) {
$assert(text, 'text can not be null');
this.setAttribute('text', text);
}