diff --git a/src/editor/AspNetEdit.Editor.ComponentModel/ChangeLog b/src/editor/AspNetEdit.Editor.ComponentModel/ChangeLog index 4645cb3..4070631 100644 --- a/src/editor/AspNetEdit.Editor.ComponentModel/ChangeLog +++ b/src/editor/AspNetEdit.Editor.ComponentModel/ChangeLog @@ -1,3 +1,8 @@ +2006-04-26 Michael Hutchinson + + * ToolboxService.cs: Convert the TooboxItem arrays properly or they become + null when empty, and ToolboxItemCollection gets unhappy. + 2006-01-16 Michael Hutchinson * MenuCommandService.cs, WebFormPage.cs, Document.cs: Reduce trivial warnings diff --git a/src/editor/AspNetEdit.Editor.ComponentModel/ToolboxService.cs b/src/editor/AspNetEdit.Editor.ComponentModel/ToolboxService.cs index 71105eb..ca5b224 100644 --- a/src/editor/AspNetEdit.Editor.ComponentModel/ToolboxService.cs +++ b/src/editor/AspNetEdit.Editor.ComponentModel/ToolboxService.cs @@ -151,7 +151,7 @@ namespace AspNetEdit.Editor.ComponentModel ArrayList tools = (ArrayList) categories[category]; - return new ToolboxItemCollection (tools.ToArray () as ToolboxItem[]); + return new ToolboxItemCollection ((ToolboxItem[]) tools.ToArray (typeof (ToolboxItem))); } public ToolboxItemCollection GetToolboxItems (System.ComponentModel.Design.IDesignerHost host) @@ -164,7 +164,7 @@ namespace AspNetEdit.Editor.ComponentModel if (toolboxUser.GetToolSupported (tool)) tools.Add (tool); - return new ToolboxItemCollection(tools.ToArray () as ToolboxItem[]); + return new ToolboxItemCollection ((ToolboxItem[]) tools.ToArray (typeof (ToolboxItem))); } public ToolboxItemCollection GetToolboxItems () @@ -174,7 +174,7 @@ namespace AspNetEdit.Editor.ComponentModel foreach (ArrayList arr in categories.Values) tools.AddRange (arr); - return new ToolboxItemCollection(tools.ToArray () as ToolboxItem[]); + return new ToolboxItemCollection ((ToolboxItem[]) tools.ToArray (typeof (ToolboxItem))); } public bool IsSupported (object serializedObject, System.ComponentModel.Design.IDesignerHost host)