InputControl character gets printed twice

Feb 3, 2011 at 4:54 AM

Hello,

I'm new to the nuclex framework and try to make a textbox where the user can enter some text. Basicallly I did the following in my
Game class:

 

public Game()
{
    this.graphics                   = new GraphicsDeviceManager(this);
    this.gui                        = new GuiManager(this.Services);
    this.input                      = new InputManager(this.Services);        
}
protected override void Initialize()
{
    base.Initialize();
    Viewport viewport               = this.GraphicsDevice.Viewport;
    Screen screen                   = new Screen(viewport.Width, viewport.Height);

    this.gui.Screen                 = screen;

    screen.Desktop.Bounds = new UniRectangle(
        new UniScalar(0.1f, 0.0f), new UniScalar(0.1f, 0.0f), // x and y
        new UniScalar(0.8f, 0.0f), new UniScalar(0.8f, 0.0f)); // width and height

    this.text = new Nuclex.UserInterface.Controls.Desktop.InputControl();
    this.text.Text = "";
    this.text.Bounds = new UniRectangle(10.0f, 40.0f, 410.0f, 30.0f);

           
    screen.Desktop.Children.Add(text);
}

Whenever i hit a keyboard character it gets printed twice in the input control. That means if I hit abc
the text in the input control is: aabbcc.

What am I doing wrong?

Coordinator
Feb 4, 2011 at 9:34 PM

Are you using the Subversion trunk sources or nightly builds?

I'm asking because this has been an issue (fixed as of now) I introduced while porting the GUI over to my Nuclex.Input library. It should not happen in the R1242 release on CodePlex. If you're using the trunk build, please try updating to today's build, the issue should be gone now (and if not, it would be nice if you could try it with the trunk build anyway to let me know if it still occurs :D).

Nightly builds can be found here: https://devel.nuclex.org/teamcity/viewLog.html?guest=1&buildId=lastSuccessful&tab=artifacts&buildTypeId=bt13

 

Feb 7, 2011 at 5:00 PM

Hello,

I was using the latest stable release available. Now I use the latest daily build and it works perfectly now.

 

Thanks for Your help!

 

Best Regards

Coordinator
Feb 7, 2011 at 9:50 PM

Great :)

If you prefer to stay on the stable releases, this fix also made it into the R1323 package I released on Saturday.

However, as you might have noticed by the forum activity, a few bugs have slipped into that release, so the daily builds are, ahem, *more* stable right now. My current plan is to hold out for a few more days to see if any more bugs pop up and then upload another stable release!