nicho92 / MtgDesktopCompanion

Cards manager for magic the gathering
Apache License 2.0
159 stars 35 forks source link

Deck Tag not working #179

Closed JulienSambre closed 3 years ago

JulienSambre commented 3 years ago

Hi!

I tried to add a tag to a deck and I got the following stack :

Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException
        at java.base/java.util.AbstractList.add(Unknown Source)
        at java.base/java.util.AbstractList.add(Unknown Source)
        at org.magic.gui.components.editor.JTagsPanel.addTag(JTagsPanel.java:157)
        at org.magic.gui.components.editor.JTagsPanel$1.lambda$actionPerformed$0(JTagsPanel.java:81)
        at java.desktop/javax.swing.JTextField.fireActionPerformed(Unknown Source)
        at java.desktop/javax.swing.JTextField.postActionEvent(Unknown Source)
        at java.desktop/javax.swing.JTextField$NotifyAction.actionPerformed(Unknown Source)
        at java.desktop/javax.swing.SwingUtilities.notifyAction(Unknown Source)
        at java.desktop/javax.swing.JComponent.processKeyBinding(Unknown Source)

After failing adding tag, I can no more try to add tag, the button stay gray and unclickable :

image

nicho92 commented 3 years ago

Hi, can you send me your log file ?

I need more information about your configuration (Look and feel and Jvm)

Thanks

On Tue, Aug 24, 2021 at 8:55 AM JulienSambre @.***> wrote:

Hi!

I tried to add a tag to a deck and I got the following stack :

Exception in thread "AWT-EventQueue-0" java.lang.UnsupportedOperationException at java.base/java.util.AbstractList.add(Unknown Source) at java.base/java.util.AbstractList.add(Unknown Source) at org.magic.gui.components.editor.JTagsPanel.addTag(JTagsPanel.java:157) at org.magic.gui.components.editor.JTagsPanel$1.lambda$actionPerformed$0(JTagsPanel.java:81) at java.desktop/javax.swing.JTextField.fireActionPerformed(Unknown Source) at java.desktop/javax.swing.JTextField.postActionEvent(Unknown Source) at java.desktop/javax.swing.JTextField$NotifyAction.actionPerformed(Unknown Source) at java.desktop/javax.swing.SwingUtilities.notifyAction(Unknown Source) at java.desktop/javax.swing.JComponent.processKeyBinding(Unknown Source)

After failing adding tag, I can no more try to add tag, the button stay gray and unclickable :

[image: image] https://user-images.githubusercontent.com/14327288/130570829-1278a79e-43ad-47a5-a924-1eee0364c69e.png

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/nicho92/MtgDesktopCompanion/issues/179, or unsubscribe https://github.com/notifications/unsubscribe-auth/ACXZPH6S45ODPA7AMLXB6DTT6M67PANCNFSM5CWFFOOQ . Triage notifications on the go with GitHub Mobile for iOS https://apps.apple.com/app/apple-store/id1477376905?ct=notification-email&mt=8&pt=524675 or Android https://play.google.com/store/apps/details?id=com.github.android&utm_campaign=notification-email .

JulienSambre commented 3 years ago

Hi!

Here it is :

mtgcompanion.log

nicho92 commented 3 years ago

Did you import it ? or a handed created one ?

JulienSambre commented 3 years ago

I've imported all my decks created with cockatrice.

nicho92 commented 3 years ago

OK . I see the bug.. will be fixed in next release. in ScriptPanel, can you execute this script? : dao.executeQuery('update decks set tags = NULL where tags =""');

then reopen your deck

JulienSambre commented 3 years ago

You are far too quick to respond :D.

The script fixed the problem.

Thanks!