From 957f98717a859cbb8fae0a166fe9618959eacba4 Mon Sep 17 00:00:00 2001 From: Michael Hutchinson Date: Wed, 26 Apr 2006 18:45:41 +0000 Subject: [PATCH] 2006-04-26 Michael Hutchinson * ToolboxService.cs: Convert the TooboxItem arrays properly or they become null when empty, and ToolboxItemCollection gets unhappy. svn path=/trunk/aspeditor/; revision=59938 --- src/editor/AspNetEdit.Editor.ComponentModel/ChangeLog | 5 +++++ .../AspNetEdit.Editor.ComponentModel/ToolboxService.cs | 6 +++--- 2 files changed, 8 insertions(+), 3 deletions(-) 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)