- September 12, 2009
- 798
- 577
- Home Country
- Germany
Hey,
im currently working on the atmolight plugin.
What i want to do is to show some infos via the GUIDialogOK and when OK is pressed open the VirtualKeyboard. After that i will again show some infos via GUIDialogOK.
My code looks like this:
When this is now triggered, i can see the OK Dialog, and after pressing OK, the keyboard opens like expected. I can input my value and press ok.
However the log shows me this:
And the interesting part. Doing this on my HTPC gives me these errors everytime. About 10% of the time StaticColor gets the value i entered in the keyboard, about 90% it doesnt. In both cases these exceptions occur.
When using my Laptop however, i dont get the exceptions, and my input works 100% of the time.
Both systems are Win 7 with Mediaportal 1.7 pre. HTPC has plugins installed and so on. Laptop is vanilla mp.
Anybody an idea why this is happening and how i can prevent it?
Thanks!
Edit:
Fixed it .
The code was using GUIGraphicsContext for the ActionHandler, now its using GUIWindowManager.
im currently working on the atmolight plugin.
What i want to do is to show some infos via the GUIDialogOK and when OK is pressed open the VirtualKeyboard. After that i will again show some infos via GUIDialogOK.
My code looks like this:
Code:
GUIDialogOK dlgOK = (GUIDialogOK)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_DIALOG_OK);
if (dlgOK != null)
{
dlgOK.SetHeading("Static Color:");
dlgOK.SetLine(1, "Red: N/A (next)");
dlgOK.SetLine(2, "Green: N/A");
dlgOK.SetLine(3, "Blue: N/A");
dlgOK.DoModal(GUIWindowManager.ActiveWindow);
}
VirtualKeyboard RGBKeyboard = (VirtualKeyboard)GUIWindowManager.GetWindow((int)GUIWindow.Window.WINDOW_VIRTUAL_KEYBOARD);
if (RGBKeyboard == null)
{
return;
}
RGBKeyboard.Reset();
RGBKeyboard.Text = "";
RGBKeyboard.DoModal(GUIWindowManager.ActiveWindow);
if (RGBKeyboard.IsConfirmed)
{
StaticColor = RGBKeyboard.Text;
}
When this is now triggered, i can see the OK Dialog, and after pressing OK, the keyboard opens like expected. I can input my value and press ok.
However the log shows me this:
Code:
[2014-03-16 01:08:01,434] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\dialogOK.xml' is missing control id 11 (window property: btnYes)
[2014-03-16 01:08:01,436] [Log ] [29 ] [DEBUG] - WindowManager: route WindowPlugins.home.GUIBasicHome:35->MediaPortal.Dialogs.GUIDialogOK:2002
[2014-03-16 01:08:01,611] [Log ] [29 ] [DEBUG] - DialogWindow: MediaPortal.Dialogs.GUIDialogOK init
[2014-03-16 01:08:02,971] [Log ] [MPMain ] [DEBUG] - GUIButtonControl.HyperLink: Trying to use parsed string, original , parsed
[2014-03-16 01:08:02,971] [Log ] [MPMain ] [DEBUG] - GUIButtonControl.ActionID: Trying to use parsed string, original , parsed
[2014-03-16 01:08:03,511] [Log ] [29 ] [DEBUG] - WindowManager: unroute to MediaPortal.Dialogs.GUIDialogOK:2002->WindowPlugins.home.GUIBasicHome:35
[2014-03-16 01:08:03,611] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background)
[2014-03-16 01:08:03,691] [Log ] [29 ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background)
[2014-03-16 01:08:03,797] [Log ] [29 ] [DEBUG] - WindowManager: route WindowPlugins.home.GUIBasicHome:35->MediaPortal.Dialogs.StandardKeyboard:1002
[2014-03-16 01:08:03,979] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed)
at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed)
at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime)
at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed)
[2014-03-16 01:08:03,998] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed)
at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed)
at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime)
at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed)
[2014-03-16 01:08:04,020] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed)
at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed)
at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime)
at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed)
[2014-03-16 01:08:04,116] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard init
[2014-03-16 01:08:07,838] [Log ] [29 ] [DEBUG] - WindowManager: unroute to MediaPortal.Dialogs.StandardKeyboard:1002->WindowPlugins.home.GUIBasicHome:35
[2014-03-16 01:08:07,839] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard deinit
[2014-03-16 01:08:07,849] [Log ] [MPMain ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background)
[2014-03-16 01:08:07,851] [Log ] [MPMain ] [WARN ] - GUIWindow:OnWindowLoaded: 'C:\ProgramData\Team MediaPortal\MediaPortal\Skin\Titan\stdKeyboard.xml' is missing control id 2 (window property: _background)
[2014-03-16 01:08:07,883] [Error ] [MPMain ] [ERROR] - render exception:System.ArgumentOutOfRangeException: Index was out of range. Must be non-negative and less than the size of the collection.
Parameter name: index
at System.Collections.ArrayList.get_Item(Int32 index)
at MediaPortal.GUI.Library.GUIStandardKeyboard.RenderKeyboardLatin(Single timePassed)
at MediaPortal.GUI.Library.GUIKeyboard.Render(Single timePassed)
at MediaPortal.GUI.Library.GUIControl.DoRender(Single timePassed, UInt32 currentTime)
at MediaPortal.GUI.Library.GUIWindow.Render(Single timePassed)
[2014-03-16 01:08:07,889] [Log ] [29 ] [DEBUG] - Window: MediaPortal.Dialogs.StandardKeyboard deinit
And the interesting part. Doing this on my HTPC gives me these errors everytime. About 10% of the time StaticColor gets the value i entered in the keyboard, about 90% it doesnt. In both cases these exceptions occur.
When using my Laptop however, i dont get the exceptions, and my input works 100% of the time.
Both systems are Win 7 with Mediaportal 1.7 pre. HTPC has plugins installed and so on. Laptop is vanilla mp.
Anybody an idea why this is happening and how i can prevent it?
Thanks!
Edit:
Fixed it .
The code was using GUIGraphicsContext for the ActionHandler, now its using GUIWindowManager.
Last edited: