[1.3b54] Align Grid negative value returns an error (benign)

Moderators: dorpond, trevor, Azhrei, giliath, jay, Mr.Ice, MapTool BugReport Manager

Post Reply
User avatar
Paradox
Dragon
Posts: 724
Joined: Fri Feb 27, 2009 4:01 pm

[1.3b54] Align Grid negative value returns an error (benign)

Post by Paradox »

When using the Align Grid function a pop-up window comes up allowing the user to set their own X and Y Offsets. If you backspace to change a negative value, an error is returned.. before you can type a number in.

This is a very minor error. You can close the error message and type in the desired value. I am only reporting it because I saw it come up, and share the desire to have 1.3 be as perfect as possible for new users who might come when 1.3 if released.

Steps to Repeat
1. Create New Map
2.) Use Align Grid Function
3.) Manually alter the coordinates in the pop up window. If you attempt to change a negative value, and the only the minus sign remains, an error message is triggered.

Code: Select all

java.lang.NumberFormatException: For input string: "-"
	at java.lang.NumberFormatException.forInputString(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at java.lang.Integer.parseInt(Unknown Source)
	at net.rptools.maptool.client.tool.GridTool.getInt(GridTool.java:215)
	at net.rptools.maptool.client.tool.GridTool.getInt(GridTool.java:212)
	at net.rptools.maptool.client.tool.GridTool.copyControlPanelToGrid(GridTool.java:195)
	at net.rptools.maptool.client.tool.GridTool.access$6(GridTool.java:186)
	at net.rptools.maptool.client.tool.GridTool$UpdateGridListener.keyReleased(GridTool.java:457)
	at java.awt.Component.processKeyEvent(Unknown Source)
	at javax.swing.JComponent.processKeyEvent(Unknown Source)
	at java.awt.Component.processEvent(Unknown Source)
	at java.awt.Container.processEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.KeyboardFocusManager.redispatchEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.preDispatchKeyEvent(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.typeAheadAssertions(Unknown Source)
	at java.awt.DefaultKeyboardFocusManager.dispatchEvent(Unknown Source)
	at java.awt.Component.dispatchEventImpl(Unknown Source)
	at java.awt.Container.dispatchEventImpl(Unknown Source)
	at java.awt.Window.dispatchEventImpl(Unknown Source)
	at java.awt.Component.dispatchEvent(Unknown Source)
	at java.awt.EventQueue.dispatchEvent(Unknown Source)
	at net.rptools.maptool.client.swing.MapToolEventQueue.dispatchEvent(MapToolEventQueue.java:24)
	at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
	at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
	at java.awt.EventDispatchThread.run(Unknown Source)
Attachments
An example of the error
An example of the error
Align Grid Error.jpg (308.95 KiB) Viewed 4975 times
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

User avatar
jfrazierjr
Deity
Posts: 5176
Joined: Tue Sep 11, 2007 7:31 pm

Re: [1.3b54] Align Grid negative value returns an error (benign)

Post by jfrazierjr »

Ah... it looks like it is processing every key event, so when you remove the number part and just have the negative sign, it (correctly) errors that this is not a valid number which is true.
I save all my Campaign Files to DropBox. Not only can I access a campaign file from pretty much any OS that will run Maptool(Win,OSX, linux), but each file is versioned, so if something goes crazy wild, I can always roll back to a previous version of the same file.

Get your Dropbox 2GB via my referral link, and as a bonus, I get an extra 250 MB of space. Even if you don't don't use my link, I still enthusiastically recommend Dropbox..

User avatar
Paradox
Dragon
Posts: 724
Joined: Fri Feb 27, 2009 4:01 pm

Re: [1.3b54] Align Grid negative value returns an error (benign)

Post by Paradox »

jfrazierjr wrote:Ah... it looks like it is processing every key event, so when you remove the number part and just have the negative sign, it (correctly) errors that this is not a valid number which is true.
That would be a correct assessment.

I do see where the program is coming from, no it's not a valid number, but on the other hand there was no intention to leave it in that state either.

It is a benign glitch, except that you get an error message that prevents you from continuing until you clear it. I suppose its cosmetic more than anything.
I no longer believe that MapTools is usuable or intended just for programmers. MapTools is for everyone.

User avatar
trevor
Codeum Arcanum (RPTools Founder)
Posts: 11311
Joined: Mon Jan 09, 2006 4:16 pm
Location: Austin, Tx
Contact:

Re: [1.3b54] Align Grid negative value returns an error (benign)

Post by trevor »

Fixed in 1.3b59
Dreaming of a 1.3 release

Post Reply

Return to “Resolved”