home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
MediaPortal 1 Plugins
GUI List Control
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="JestriK" data-source="post: 70475" data-attributes="member: 23929"><p>OK, since my last post have figured out what I was doing wrong - I should be using a GUIFacadeControl.</p><p></p><p>Now I've got that sorted that out, I have the code below.</p><p></p><p>[code]</p><p>private void LoadList(string currentDirectory)</p><p>{</p><p> ArrayList arry = new ArrayList();</p><p> arry.Add(".pdf");</p><p> virtualDirectory.SetExtensions(arry);</p><p></p><p> List<GUIListItem> items = virtualDirectory.GetDirectoryExt(currentDirectory);</p><p></p><p> facadeView.Clear();</p><p></p><p> for (int i = 0; items.Count > i; i++)</p><p> facadeView.Add(items[0]);</p><p>}</p><p>[/code]</p><p></p><p>When it gets to adding the items to the facade control it throws the following exception -</p><p></p><p>[code]OnMessage exception:System.DivideByZeroException: Attempted to divide by zero.</p><p> at MediaPortal.GUI.Library.GUIListControl.Add(GUIListItem item)</p><p> at MediaPortal.GUI.Library.GUIFacadeControl.Add(GUIListItem item)</p><p> at MediaPortal.GUI.Library.GUIFacadeControl.OnMessage(GUIMessage message)</p><p> at MediaPortal.GUI.Library.GUIWindow.OnMessage(GUIMessage message)[/code]</p><p></p><p>Can anyone see what I'm doing wrong, because I'm stumped!</p><p></p><p>Cheers,</p><p>JestriK</p></blockquote><p></p>
[QUOTE="JestriK, post: 70475, member: 23929"] 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 [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
MediaPortal 1 Plugins
GUI List Control
Contact us
RSS
Top
Bottom