Hi,
I'm trying the manipulate segments with ProcessSegmentPairs, but I always get the following exception in Studio 2015 12.0.4996.3:
System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
at Sdl.TranslationStudio.Editor.AbstractActiveRangeAction.IsActionEnabled()
at Sdl.TranslationStudio.Api.Editor.AbstractActiveDocumentAction.UpdateAction()
at Sdl.TranslationStudio.Editor.AbstractActiveRangeAction.sideBySideEditor_Target_Entered(Object sender, EventArgs e)
at System.EventHandler.Invoke(Object sender, EventArgs e)
at System.Windows.Forms.Control.OnGotFocus(EventArgs e)
at System.Windows.Forms.Control.WmSetFocus(Message& m)
at System.Windows.Forms.Control.WndProc(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)
And then immediately another one:
System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
at Sdl.TranslationStudioAutomation.IntegrationApi.Document.ProcessSegment(String processingName, ISegmentContainerNode segmentContainerNode, Action`2 process)
at Sdl.TranslationStudioAutomation.IntegrationApi.Document.ProcessSegmentPairs(String processingName, Action`2 process)
at Kaleidoscope.SmartQuery.Plugin.Utility.SmartQueryDataHandlerV2.SavePostedQueryInformation(Int32 queryId)
This is all I try to do at the moment:
if (editorController != null && editorController.ActiveDocument != null)
editorController.ActiveDocument.ProcessSegmentPairs(SmartDataTagOperationName, (pair, args) =>
{
});
The strange is that the same works in Studio2014. Can you please help?
thanks,
Tamas