Deck API changes (r19562)
Post MTG Forge Related Programming Questions Here
	Moderators: timmermac, Agetian, friarsol, Blacksmith, KrazyTheFox, CCGHQ Admins
			3 posts
			 • Page 1 of 1
		
	
Deck API changes (r19562)
by Max mtg » 12 Feb 2013, 22:22 
I was wrong trying to push every possible section of a deck under sideboard header.
This release offers an updated API for decks.
Bugs? Suggestions?
			This release offers an updated API for decks.
- Code: Select all
 deck.get(DeckSection.NAME) returns cardpool or null;
deck.has(DeckSection.NAME) checks if section is present and not empty
deck.getOrCreate(DeckSection.NAME) returns matching cardpool or creates a new one, if it was not present, returns the cardpool
Bugs? Suggestions?
Single class for single responsibility.
		- Max mtg
 - Programmer
 - Posts: 1997
 - Joined: 02 Jul 2011, 14:26
 - Has thanked: 173 times
 - Been thanked: 334 times
 
Re: Deck API changes (r19562)
by myk » 13 Feb 2013, 00:53 
getting a NPE on program load (the quest decks page was the last open page):
			
				- | Open
 - Code: Select all
 java.lang.NullPointerException
at forge.deck.Deck.getMain(Deck.java:100)
at forge.gui.toolbox.DeckLister.setDecks(DeckLister.java:154)
at forge.gui.home.quest.CSubmenuQuestDecks.update(CSubmenuQuestDecks.java:67)
at forge.gui.home.CHomeUI.itemClick(CHomeUI.java:37)
at forge.gui.home.CHomeUI.selectPrevious(CHomeUI.java:105)
at forge.gui.home.CHomeUI.initialize(CHomeUI.java:61)
at forge.control.FControl.changeState(FControl.java:210)
at forge.view.FView.initialize(FView.java:110)
at forge.control.FControl$6.run(FControl.java:184)
at java.awt.event.InvocationEvent.dispatch(InvocationEvent.java:209)
at java.awt.EventQueue.dispatchEventImpl(EventQueue.java:702)
at java.awt.EventQueue.access$400(EventQueue.java:82)
at java.awt.EventQueue$2.run(EventQueue.java:663)
at java.awt.EventQueue$2.run(EventQueue.java:661)
at java.security.AccessController.doPrivileged(Native Method)
at java.security.AccessControlContext$1.doIntersectionPrivilege(AccessControlContext.java:87)
at java.awt.EventQueue.dispatchEvent(EventQueue.java:672)
at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:296)
at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:211)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:201)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:196)
at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:188)
at java.awt.EventDispatchThread.run(EventDispatchThread.java:122)
- Attachments
 - 
		
 PixieLinh.gz- (92.21 KiB) Downloaded 185 times
 
 
- myk
 - Posts: 439
 - Joined: 17 Jan 2013, 02:39
 - Location: California
 - Has thanked: 38 times
 - Been thanked: 57 times
 
Re: Deck API changes (r19562)
by Max mtg » 13 Feb 2013, 06:50 
So did I get an NPE 
correct Quest deck serialization arrives with r19565
			correct Quest deck serialization arrives with r19565
Single class for single responsibility.
		- Max mtg
 - Programmer
 - Posts: 1997
 - Joined: 02 Jul 2011, 14:26
 - Has thanked: 173 times
 - Been thanked: 334 times
 
			3 posts
			 • Page 1 of 1
		
	
Who is online
Users browsing this forum: No registered users and 81 guests