Skip to content

Commit

Permalink
fixed small issue with new doc implementation
Browse files Browse the repository at this point in the history
  • Loading branch information
Ruben Daniels committed Oct 21, 2010
1 parent 0a1fb65 commit cefc7a0
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 6 deletions.
2 changes: 2 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,8 @@

* Tweaked keybindings

* Fixed save and dirty state issues.


2010.10.19, Version 0.1.1

Expand Down
4 changes: 3 additions & 1 deletion client/core/document.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,8 @@ require.def("core/document",
function() {

var Document = function(node, docValue){
this.$init();

this.getNode = function(){
return node;
}
Expand All @@ -27,7 +29,7 @@ var Document = function(node, docValue){
: docValue);
}
};
Document.prototype = new apf.Class().$init();
Document.prototype = new apf.Class();

return Document;

Expand Down
9 changes: 4 additions & 5 deletions client/ext/code/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,13 @@ return ext.register("ext/code/code", {
doc.acedoc.setUndoManager(actiontracker);//new UndoManager());

doc.addEventListener("prop.value", function(e){
//@todo this function is called twice, find out why
this.acedoc.setValue(e.value || "");
this.isInited = true;
doc.acedoc.setValue(e.value || "");
doc.isInited = true;
});

doc.addEventListener("retrievevalue", function(e){
if (!this.isInited) return e.value;
else return this.acedoc.toString();
if (!doc.isInited) return e.value;
else return doc.acedoc.toString();
});

doc.addEventListener("close", function(){
Expand Down

0 comments on commit cefc7a0

Please sign in to comment.