Answered
error in GUMBO document
endCompositeOperation () method
public function endCompositeOperation():void
End a group of operations. Whatever operations were done since the last call to beginCompositeOperation are grouped in a CompositeOperation that is then completed (i.e., added to the undo stack or if we are in a nested composite operation, added to the parent operation).
Example
This code snippet shows how to begin, end, and execute an operations block within an EditManager.
var editManager:IEditManager = SelManager as IEditManager;
var insertPos:int = 15;
var insertText:String = "Hello There";
var insertSize:Number = 48;
editManager.beginCompositeOperation();
SelManager.setSelection(insertPos, insertPos);
editManager.insertText(insertText);
SelManager.setSelection(insertPos, insertPos + insertText.length);
var charFormat:CharacterFormat = new CharacterFormat();
charFormat.fontSize = insertSize;
editManager.applyFormat(charFormat);
var op:FlowOperation = editManager.endCompositeOperation();
editManager.doOperation(op);
endCompositeOperation() return void. i think the above line should be : editManager.flushPendingOperations();
This is for new gumbo build.
Am i correct ?
public function endCompositeOperation():void
End a group of operations. Whatever operations were done since the last call to beginCompositeOperation are grouped in a CompositeOperation that is then completed (i.e., added to the undo stack or if we are in a nested composite operation, added to the parent operation).
Example
This code snippet shows how to begin, end, and execute an operations block within an EditManager.
var editManager:IEditManager = SelManager as IEditManager;
var insertPos:int = 15;
var insertText:String = "Hello There";
var insertSize:Number = 48;
editManager.beginCompositeOperation();
SelManager.setSelection(insertPos, insertPos);
editManager.insertText(insertText);
SelManager.setSelection(insertPos, insertPos + insertText.length);
var charFormat:CharacterFormat = new CharacterFormat();
charFormat.fontSize = insertSize;
editManager.applyFormat(charFormat);
var op:FlowOperation = editManager.endCompositeOperation();
editManager.doOperation(op);
endCompositeOperation() return void. i think the above line should be : editManager.flushPendingOperations();
This is for new gumbo build.
Am i correct ?
