Normal
OK, since my last post have figured out what I was doing wrong - I should be using a GUIFacadeControl.Now I've got that sorted that out, I have the code below.[code]private void LoadList(string currentDirectory){ ArrayList arry = new ArrayList(); arry.Add(".pdf"); virtualDirectory.SetExtensions(arry); List<GUIListItem> items = virtualDirectory.GetDirectoryExt(currentDirectory); facadeView.Clear(); for (int i = 0; items.Count > i; i++) facadeView.Add(items[0]);}[/code]When it gets to adding the items to the facade control it throws the following exception -[code]OnMessage exception:System.DivideByZeroException: Attempted to divide by zero. at MediaPortal.GUI.Library.GUIListControl.Add(GUIListItem item) at MediaPortal.GUI.Library.GUIFacadeControl.Add(GUIListItem item) at MediaPortal.GUI.Library.GUIFacadeControl.OnMessage(GUIMessage message) at MediaPortal.GUI.Library.GUIWindow.OnMessage(GUIMessage message)[/code]Can anyone see what I'm doing wrong, because I'm stumped!Cheers,JestriK
OK, since my last post have figured out what I was doing wrong - I should be using a GUIFacadeControl.
Now I've got that sorted that out, I have the code below.
[code]
private void LoadList(string currentDirectory)
{
ArrayList arry = new ArrayList();
arry.Add(".pdf");
virtualDirectory.SetExtensions(arry);
List<GUIListItem> items = virtualDirectory.GetDirectoryExt(currentDirectory);
facadeView.Clear();
for (int i = 0; items.Count > i; i++)
facadeView.Add(items[0]);
}
[/code]
When it gets to adding the items to the facade control it throws the following exception -
[code]OnMessage exception:System.DivideByZeroException: Attempted to divide by zero.
at MediaPortal.GUI.Library.GUIListControl.Add(GUIListItem item)
at MediaPortal.GUI.Library.GUIFacadeControl.Add(GUIListItem item)
at MediaPortal.GUI.Library.GUIFacadeControl.OnMessage(GUIMessage message)
at MediaPortal.GUI.Library.GUIWindow.OnMessage(GUIMessage message)[/code]
Can anyone see what I'm doing wrong, because I'm stumped!
Cheers,
JestriK