Answered
Problem in using CutOperation
Hi,
I'm having problem in using "CutOperation" object directly. When calling EditManager's method "cutTextScrap" then cut operation works but if I create CutOperation and execute it using the EditManager's doOperation() then it throws exception. Can you please point out what am I doing wrong here.
//This code works:
var selState:SelectionState = new SelectionState(textFlow, 5, 10);
var textScrap:TextScrap = em.cutTextScrap(selState);
//This code doesn't work:
var selState:SelectionState = new SelectionState(textFlow, 5, 10);
var textScrap:TextScrap = new TextScrap(textFlow);
var op:CutOperation = new CutOperation(selState, textScrap);
em.doOperation(op);
Thanks,
Ahmed
I'm having problem in using "CutOperation" object directly. When calling EditManager's method "cutTextScrap" then cut operation works but if I create CutOperation and execute it using the EditManager's doOperation() then it throws exception. Can you please point out what am I doing wrong here.
//This code works:
var selState:SelectionState = new SelectionState(textFlow, 5, 10);
var textScrap:TextScrap = em.cutTextScrap(selState);
//This code doesn't work:
var selState:SelectionState = new SelectionState(textFlow, 5, 10);
var textScrap:TextScrap = new TextScrap(textFlow);
var op:CutOperation = new CutOperation(selState, textScrap);
em.doOperation(op);
Thanks,
Ahmed
