Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

2006-04-26 Michael Hutchinson <m.j.hutchinson@gmail.com>

	* ToolboxService.cs: Convert the TooboxItem arrays properly or they become
	null when empty, and ToolboxItemCollection gets unhappy. 


svn path=/trunk/aspeditor/; revision=59938
  • Loading branch information...
commit 957f98717a859cbb8fae0a166fe9618959eacba4 1 parent 84ec924
@mhutch mhutch authored
View
5 src/editor/AspNetEdit.Editor.ComponentModel/ChangeLog
@@ -1,3 +1,8 @@
+2006-04-26 Michael Hutchinson <m.j.hutchinson@gmail.com>
+
+ * ToolboxService.cs: Convert the TooboxItem arrays properly or they become
+ null when empty, and ToolboxItemCollection gets unhappy.
+
2006-01-16 Michael Hutchinson <m.j.hutchinson@gmail.com>
* MenuCommandService.cs, WebFormPage.cs, Document.cs: Reduce trivial warnings
View
6 src/editor/AspNetEdit.Editor.ComponentModel/ToolboxService.cs
@@ -151,7 +151,7 @@ public ToolboxItemCollection GetToolboxItems (string category)
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 @@ public ToolboxItemCollection GetToolboxItems (System.ComponentModel.Design.IDesi
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 @@ public ToolboxItemCollection GetToolboxItems ()
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)
Please sign in to comment.
Something went wrong with that request. Please try again.