When I tried using the static methods to build a TextInputDialog, an IllegalArgumentException was triggered with this message: TerminalSize.columns cannot be less than 0!
I got around the issue by commenting out line #49 okCancelPanel.addComponent(new EmptySpace(space, 1));
I guess the dialog does not look the way it's supposed to when this line is commented out, but I couldn't see what it was supposed to be :)
Comment #1
Posted on Dec 9, 2012 by Grumpy OxThere's probably a regression in there somewhere, but I'm having problems reproducing it. I've just committed a test case to the default branch, could you try it out? https://code.google.com/p/lanterna/source/browse/src/test/java/com/googlecode/lanterna/test/issue/Issue53.java
If you have any example code that fails, please do share. Also, which version are you using?
Comment #2
Posted on Dec 10, 2012 by Quick RabbitI can't reproduce the issue with your test case with the latest integration build published on Maven Central either.
I recently re-factored my code, and it doesn't throw the exception anymore, so I guess you can mark this issue as invalid.
If I face it again, I'll definitely try to find the reason. I've just started using your library and I'm planning on reading the entire source code, as it seems to be a great source of inspiration for a great project architecture.
Comment #3
Posted on Dec 10, 2012 by Quick RabbitHa. Found how to trigger this bug. Seems that if the description is smaller than the title, I get "TerminalSize.columns cannot be less than 0!"
TextInputDialog.showTextInputBox(owner, "Testing issue 53", "Testing issue 5", ""); will throw an exception but TextInputDialog.showTextInputBox(owner, "Testing issue 53", "Testing issue 53!", ""); won't
Comment #4
Posted on Dec 16, 2012 by Grumpy OxLovely, thanks! I'll get this fixed right away.
Comment #5
Posted on Dec 16, 2012 by Grumpy OxFixed on 2.0, 2.1 and default branch, I'll push new snapshots to Maven
Status: Fixed
Labels:
Type-Defect
Priority-Medium