BoardPicker is not an AbstractBuildable !?

Does anyone know why BoardPicker is not an AbstractBuildable? It is messing me up in getting my new HexGridNumbering working with ZonedGrids in the Player:

In order to avoid recalculating affine transformations that are dependent only on board paramaters, I cache them and build them only on change of paramaters (in the Editor) or on load completion (in the Player). However, since a ZonedGrid is both a Grid and a GridContaainer, and the Player builds the module depth-first, this adds a level of indirection that cannot be unwound in HexGrid.addTo(), since the parent ZonedGrid has not yet been added to the Board.

So, I am running this code in my Plug-in after the build completes:

for (HexGrid hexgrid : GameModule.getGameModule().getAllDescendantComponentsOf(HexGrid.class)) {
    hexgrid.initTransforms();
}

and it fails because BoardPicker is not an AbstractBuildable, truncating the depth search.

I tried adding “extends AbstractBuildable” and the missing method:
public String[] getAttributeNames() { return new String[0]; }
but this seems to be just the start of a long string out of a maze. Does anyone have any thoughts?

Thanks in advance.

It’s not at all obvious what affine transformations you are calculating and why you would want to cache them. Also, why would they change at run time?

  • M.

On 2011-01-02, at 4:48 PM, pgeerkens pgeerkens@hotmail.com wrote:

Does anyone know why BoardPicker is not an AbstractBuildable? It is
messing me up in getting my new HexGridNumbering working with ZonedGrids
in the Player:

In order to avoid recalculating affine transformations that are
dependent only on board paramaters, I cache them and build them only on
change of paramaters (in the Editor) or on load completion (in the
Player). However, since a ZonedGrid is both a Grid and a GridContaainer,
and the Player builds the module depth-first, this adds a level of
indirection that cannot be unwound in HexGrid.addTo(), since the parent
ZonedGrid has not yet been added to the Board.

So, I am running this code in my Plug-in after the build completes:

for (HexGrid hexgrid :
GameModule.getGameModule().getAllDescendantComponentsOf(HexGrid.class))
{
hexgrid.initTransforms();
}

and it fails because BoardPicker is not an AbstractBuildable, truncating
the depth search.

I tried adding “extends AbstractBuildable” and the missing method:
public String[] getAttributeNames() { return new String[0]; }
but this seems to be just the start of a long string out of a maze. Does
anyone have any thoughts?

Thanks in advance.


Read this topic online here:
https://forum.vassalengine.org/t/boardpicker-is-not-an-abstractbuildable/3545/1


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

They don’t change at run-time, so there is no need to calculate them more than once. It seems best to clculate them as the Grid loads, but when the grid is on a Zoned-grid it cannot access the Board extent to determine MaxColumns/MaxRows/MaxObliques in case HDescending or VDescending is true.

Why not just force the user to specify? Yes it’s redundant, but it’s the simplest solution. What’s the worst that can happen?

  • M

On 2011-01-02, at 4:58 PM, pgeerkens pgeerkens@hotmail.com wrote:

They don’t change at run-time, so there is no need to calculate them
more than once. It seems best to clculate them as the Grid loads, but
when the grid is on a Zoned-grid it cannot access the Board extent to
determine MaxColumns/MaxRows/MaxObliques in case HDescending or
VDescending is true.


Read this topic online here:
https://forum.vassalengine.org/t/boardpicker-is-not-an-abstractbuildable/3545/3


messages mailing list
messages@vassalengine.org
vassalengine.org/mailman/listinfo/messages

Not sure what you mean. Have the user specify what, exactly?

It turned out not such a long string to get out of the maze after all.

Added to BoardPicker:

extends AbstractBuildable

public void remove(Buildable b) { ...
    super.add(b);
}

public String[] getAttributeNames() { return new String[0]; }

and that seems to work fine. Is this going to break anything obvious?

Make an experimental build and I’ll tell you

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of pgeerkens
Sent: Sunday, January 02, 2011 4:32 PM
To: messages@vassalengine.org
Subject: [messages] [Technical Support & Bugs] Re: BoardPicker is not
anAbstractBuildable !?

It turned out not such a long string to get out of the maze after all.

Added to BoardPicker:

extends AbstractBuildable

public void remove(Buildable b) { ...
    super.add(b);
}

public String[] getAttributeNames() { return new String[0]; }

and that seems to work fine. Is this going to break anything obvious?


Read this topic online here:
https://forum.vassalengine.org/t/boardpicker-is-not-an-abstractbuildable/3545/6

Hi Tim,

It is now working fine in my AH-Waterloo module, if that is what you mean.

Otherwise, as a newbie, I will need a quick how-to on making an experimental
build.

Thank you

Pieter Geerkens B.Sc., CGA
pgeerkens@hotmail.com
-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Tim McCarron
Sent: Sunday, January 02, 2011 5:36 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Re: BoardPicker is
notanAbstractBuildable !?

Make an experimental build and I’ll tell you

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of pgeerkens
Sent: Sunday, January 02, 2011 4:32 PM
To: messages@vassalengine.org
Subject: [messages] [Technical Support & Bugs] Re: BoardPicker is not
anAbstractBuildable !?

It turned out not such a long string to get out of the maze after all.

Added to BoardPicker:

extends AbstractBuildable

public void remove(Buildable b) { ...
    super.add(b);
}

public String[] getAttributeNames() { return new String[0]; }

and that seems to work fine. Is this going to break anything obvious?


Read this topic online here:
https://forum.vassalengine.org/t/boardpicker-is-not-an-abstractbuildable/3545/6

You’ll need Joel to tell you what to do there - basically when a version of
vassal needs to be tested Joel will compile a test build and provide a link
for designers to test out. I just don’t know how to compile the entire
engine from a branch by itself I’m afraid

You basically need to do the same though - there is too much module
variation to expect one or two modules / designers will test your changes
comprehensively so you need to provide a public (or semi public) test build
that everyone can reach (at least those that are interested to see what the
changes are) and what if any things break etc…

Tim

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of pgeerkens
Sent: Sunday, January 02, 2011 4:59 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Re: BoardPicker
isnotanAbstractBuildable !?

Hi Tim,

It is now working fine in my AH-Waterloo module, if that is what you mean.

Otherwise, as a newbie, I will need a quick how-to on making an experimental
build.

Thank you

Pieter Geerkens B.Sc., CGA
pgeerkens@hotmail.com
-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Tim McCarron
Sent: Sunday, January 02, 2011 5:36 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Re: BoardPicker is
notanAbstractBuildable !?

Make an experimental build and I’ll tell you

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of pgeerkens
Sent: Sunday, January 02, 2011 4:32 PM
To: messages@vassalengine.org
Subject: [messages] [Technical Support & Bugs] Re: BoardPicker is not
anAbstractBuildable !?

It turned out not such a long string to get out of the maze after all.

Added to BoardPicker:

extends AbstractBuildable

public void remove(Buildable b) { ...
    super.add(b);
}

public String[] getAttributeNames() { return new String[0]; }

and that seems to work fine. Is this going to break anything obvious?


Read this topic online here:
https://forum.vassalengine.org/t/boardpicker-is-not-an-abstractbuildable/3545/6

Thanks Tim - that is about what I thought. I have several small changes that
I would like to move forward, along with the re-work of hex-grid numbering,
and will talk to Joel once I have them all checked-in ready to test.

Pieter Geerkens B.Sc., CGA
pgeerkens@hotmail.com

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Tim McCarron
Sent: Sunday, January 02, 2011 6:23 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Re:
BoardPickerisnotanAbstractBuildable !?

You’ll need Joel to tell you what to do there - basically when a version of
vassal needs to be tested Joel will compile a test build and provide a link
for designers to test out. I just don’t know how to compile the entire
engine from a branch by itself I’m afraid

You basically need to do the same though - there is too much module
variation to expect one or two modules / designers will test your changes
comprehensively so you need to provide a public (or semi public) test build
that everyone can reach (at least those that are interested to see what the
changes are) and what if any things break etc…

Tim

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of pgeerkens
Sent: Sunday, January 02, 2011 4:59 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Re: BoardPicker
isnotanAbstractBuildable !?

Hi Tim,

It is now working fine in my AH-Waterloo module, if that is what you mean.

Otherwise, as a newbie, I will need a quick how-to on making an experimental
build.

Thank you

Pieter Geerkens B.Sc., CGA
pgeerkens@hotmail.com
-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Tim McCarron
Sent: Sunday, January 02, 2011 5:36 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Re: BoardPicker is
notanAbstractBuildable !?

Make an experimental build and I’ll tell you

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of pgeerkens
Sent: Sunday, January 02, 2011 4:32 PM
To: messages@vassalengine.org
Subject: [messages] [Technical Support & Bugs] Re: BoardPicker is not
anAbstractBuildable !?

It turned out not such a long string to get out of the maze after all.

Added to BoardPicker:

extends AbstractBuildable

public void remove(Buildable b) { ...
    super.add(b);
}

public String[] getAttributeNames() { return new String[0]; }

and that seems to work fine. Is this going to break anything obvious?


Read this topic online here:
https://forum.vassalengine.org/t/boardpicker-is-not-an-abstractbuildable/3545/6

Thus spake “Tim McCarron”:

You’ll need Joel to tell you what to do there - basically when a version of
vassal needs to be tested Joel will compile a test build and provide a link
for designers to test out. I just don’t know how to compile the entire
engine from a branch by itself I’m afraid

Yeah, sorry. I’m planning to try to make this easier sometime soon. For
the next week or so I’m very time-limited. (Pieter: don’t expect any
movement from me before the 11th, when I’m home again.)


J.

I understand.

If you do have a chance to look at the new HexNumbering,
(mostly in …board.CanonHexIndices and …mapgrid.WorldHexIndices)
or any of these changes:
Player: Added a recursive invocation of startSequence() for all
components exposing AutoRun, just after Wizard completion.
This appears to be the earliest (easily accessible) moment
when the KeyStroke Listeners are active. Possibly
deprecates Plugin.init().
PieceMover: Added the capability for Mark Unmoved to be accessed
programmatically via a hot-key.
SendToLocation:
Added a fifth option, of sending to a GridLocation
name.
before then I would be thrilled.

Some additional proposals for consideration:
AbstractBuildable.addComponents(Class target, List l):
Change
else if (b instanceof AbstractBuildable)
to
if (b instanceof AbstractBuildable)
so that the recursive search continues beneath instances of
target that are found.
Player:
Replace
protected GameModule createModule(DataArchive archive) {
return new BasicModule(archive);
}
with code to actually instantiate the class named as the
top-level class in dataArchive.
Board & ZonedGrid:
Deprecate these two classes with the new class ZonedBoard,
with
the functionality currently exposed by both.

Happy New Year.

Pieter

Pieter Geerkens B.Sc., CGA
pgeerkens@hotmail.com

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of Joel Uckelman
Sent: Sunday, January 02, 2011 11:30 PM
To: messages@vassalengine.org
Subject: Re: [messages] [Technical Support & Bugs] Re:
BoardPickerisnotanAbstractBuildable !?

Thus spake “Tim McCarron”:

You’ll need Joel to tell you what to do there - basically when a version
of
vassal needs to be tested Joel will compile a test build and provide a
link
for designers to test out. I just don’t know how to compile the entire
engine from a branch by itself I’m afraid

Yeah, sorry. I’m planning to try to make this easier sometime soon. For
the next week or so I’m very time-limited. (Pieter: don’t expect any
movement from me before the 11th, when I’m home again.)


J.