Posted 16 years ago
by Nicolas Teeuwen

I have a save as command implemented. The only difference between that command and our Save command is that it always shows the SaveAs dialog.
I get the following though when I try to update the recent document manager from the SaveAs command. I do not know how to resolve this.
A first chance exception of type 'System.InvalidOperationException' occurred in WindowsBase.dll
System.InvalidOperationException: Cannot change ObservableCollection during a CollectionChanged event.
at System.Collections.ObjectModel.ObservableCollection`1.CheckReentrancy()
at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection`1.Remove(T item)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.a()
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.a(Object A_0, NotifyCollectionChangedEventArgs A_1)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at ActiproSoftware.Windows.DeferrableObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at ActiproSoftware.Windows.DeferrableObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location, String name, Object tag)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location)
at Flow.PathSequencer.MainWindow.FileSaveAsCommand_Execute(Object sender, ExecutedRoutedEventArgs e) in E:\FlowMaster\SVN\FlowMaster Next Gen\Flow.PathSequencer\MainWindow.xaml.cs:line 898
[Modified at 10/16/2009 03:10 PM]
I get the following though when I try to update the recent document manager from the SaveAs command. I do not know how to resolve this.
A first chance exception of type 'System.InvalidOperationException' occurred in WindowsBase.dll
System.InvalidOperationException: Cannot change ObservableCollection during a CollectionChanged event.
at System.Collections.ObjectModel.ObservableCollection`1.CheckReentrancy()
at System.Collections.ObjectModel.ObservableCollection`1.RemoveItem(Int32 index)
at System.Collections.ObjectModel.Collection`1.Remove(T item)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.a()
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.a(Object A_0, NotifyCollectionChangedEventArgs A_1)
at System.Collections.Specialized.NotifyCollectionChangedEventHandler.Invoke(Object sender, NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at ActiproSoftware.Windows.DeferrableObservableCollection`1.OnCollectionChanged(NotifyCollectionChangedEventArgs e)
at System.Collections.ObjectModel.ObservableCollection`1.InsertItem(Int32 index, T item)
at ActiproSoftware.Windows.DeferrableObservableCollection`1.InsertItem(Int32 index, T item)
at System.Collections.ObjectModel.Collection`1.Add(T item)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location, String name, Object tag)
at ActiproSoftware.Windows.DocumentManagement.RecentDocumentManager.NotifyDocumentOpened(Uri location)
at Flow.PathSequencer.MainWindow.FileSaveAsCommand_Execute(Object sender, ExecutedRoutedEventArgs e) in E:\FlowMaster\SVN\FlowMaster Next Gen\Flow.PathSequencer\MainWindow.xaml.cs:line 898
[Modified at 10/16/2009 03:10 PM]