# New patch in my branch for inclusion in trunk and 3.1 branch

**URL:** <https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746>\
**Category:** Development\
**Created:** [January 27, 2010, 6:19pm UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746 "2010-01-27T18:19:23Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![jimcot](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jimcot](https://forum.vassalengine.org/u/jimcot)\
**Post date:** [January 27, 2010, 6:19pm UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/1 "2010-01-27T18:19:23Z")

</div>

I made a minor change to the editor. Specifically, instead of being forced to type (and remember) the name of a prototype definition, you will now be able to select from a list of valid prototype definition names.

Let me know if you have any concerns.

TIA

Jim

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [January 27, 2010, 9:52pm UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/2 "2010-01-27T21:52:52Z")

</div>

Hi Jim,

Excellent. I have been meaning to do that for years!

Does it allow you to override the text and enter the name of a non-existent prototype? You may want to use the name of a prototype that you have not created yet. Or the name of a prototype that only exists in an Extension, not in the main module.

Rgds,  
Brent.

\*\*\*\*\*\*\*\*\*\*\* REPLY SEPARATOR \*\*\*\*\*\*\*\*\*\*\*

On 27/01/2010 at 10:19 AM jimcot wrote:

> [@](#):
>
> I made a minor change to the editor. Specifically, instead of being  
> forced to type (and remember) the name of a prototype definition, you will  
> now be able to select from a list of valid prototype definition names.
> 
> Let me know if you have any concerns.
> 
> TIA
> 
> Jim

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org)  
[forums.vassalengine.org/mailman/ … engine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![jimcot](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jimcot](https://forum.vassalengine.org/u/jimcot)\
**Post date:** [January 28, 2010, 1:22am UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/3 "2010-01-28T01:22:45Z")

</div>

> [@Brent Easton](#):
>
> Hi Jim,
> 
> Excellent. I have been meaning to do that for years!
> 
> Does it allow you to override the text and enter the name of a non-existent prototype? You may want to use the name of a prototype that you have not created yet. Or the name of a prototype that only exists in an Extension, not in the main module.

I thought about that, but decided it wasn’t worth the effort. It’s easy enough to go declare the prototype first, even if you don’t put anything in it.

I’m going to do the same for ‘send to location’ as well as anywhere else it makes sense. Attempting to build/edit a module I am finding a lot of places where a small change improves module creation/updates immensely.

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [January 28, 2010, 1:40am UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/4 "2010-01-28T01:40:44Z")

</div>

> [@](#):
>
> I thought about that, but decided it wasn’t worth the effort. It’s easy  
> enough to go declare the prototype first, even if you don’t put anything  
> in it.

Modules already exist that add prototypes to pieces in the main module, where the prototype is only defined in an extension. It allows you to future-proof the module by allowing extensions to add functionality to counters defined in the core module, without having to provide a completely new counter set.

It shouldn’t be hard to do, just make it an Editable Combo-box.

Rgds,  
B.

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org)  
[forums.vassalengine.org/mailman/ … engine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![jimcot](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jimcot](https://forum.vassalengine.org/u/jimcot)\
**Post date:** [January 28, 2010, 2:22am UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/5 "2010-01-28T02:22:35Z")

</div>

> [@Brent Easton](#):
>
> > [@](#):
> >
> > I thought about that, but decided it wasn’t worth the effort. It’s easy  
> > enough to go declare the prototype first, even if you don’t put anything  
> > in it.
> 
> Modules already exist that add prototypes to pieces in the main module, where the prototype is only defined in an extension. It allows you to future-proof the module by allowing extensions to add functionality to counters defined in the core module, without having to provide a completely new counter set.
> 
> It shouldn’t be hard to do, just make it an Editable Combo-box.

That makes sense. I’ll go ahead and change it. Hold off on merging until I post here again saying it’s ready.

tia.

Jim.

---

<div class="post-metadata">

**Author:** ![jimcot](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jimcot](https://forum.vassalengine.org/u/jimcot)\
**Post date:** [January 28, 2010, 8:52pm UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/6 "2010-01-28T20:52:19Z")

</div>

Ok, you can now enter text in the combo box as well as select from a list of existing prototype definitions. Take a look and let me know if it’s ok now.

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [January 29, 2010, 12:51am UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/7 "2010-01-29T00:51:20Z")

</div>

That’s looking good.

One funny I found was that if you delete a prototype definition, it still appears as an option in the drop-down list. New prototype definitions appear correctly.

B.

\*\*\*\*\*\*\*\*\*\*\* REPLY SEPARATOR \*\*\*\*\*\*\*\*\*\*\*

On 28/01/2010 at 12:52 PM jimcot wrote:

> [@](#):
>
> Ok, you can now enter text in the combo box as well as select from a list  
> of existing prototype definitions. Take a look and let me know if it’s ok  
> now.

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org)  
[forums.vassalengine.org/mailman/ … engine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![jimcot](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jimcot](https://forum.vassalengine.org/u/jimcot)\
**Post date:** [January 29, 2010, 2:32am UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/8 "2010-01-29T02:32:56Z")

</div>

> [@Brent Easton](#):
>
> That’s looking good.
> 
> One funny I found was that if you delete a prototype definition, it still appears as an option in the drop-down list. New prototype definitions appear correctly.

Is it the one you defined for that trait? Or is it still hanging around internally even though it’s deleted from the module’s tree?

---

<div class="post-metadata">

**Author:** ![Brent\_Easton](https://forum.vassalengine.org/user_avatar/forum.vassalengine.org/brent_easton/32/10_2.png) [@Brent\_Easton](https://forum.vassalengine.org/u/Brent_Easton)\
**Post date:** [January 29, 2010, 5:45am UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/9 "2010-01-29T05:45:18Z")

</div>

> [@](#):
>
> Is it the one you defined for that trait? Or is it still hanging around  
> internally even though it’s deleted from the module’s tree?

I added three new prototype definitions A, B, C. Go to a prototype and all 3 correctly appear, select A. Close the prototype. Delete prototype definition C. Go back to a prototype and C still appears in the drop down list.

B.

* * *

Messages mailing list  
[Messages@forums.vassalengine.org](mailto:Messages@forums.vassalengine.org)  
[forums.vassalengine.org/mailman/ … engine.org](http://forums.vassalengine.org/mailman/listinfo/messages_forums.vassalengine.org)

Post generated using Mail2Forum ([mail2forum.com](http://www.mail2forum.com))

---

<div class="post-metadata">

**Author:** ![jimcot](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jimcot](https://forum.vassalengine.org/u/jimcot)\
**Post date:** [January 29, 2010, 8:16pm UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/10 "2010-01-29T20:16:05Z")

</div>

> [@Brent Easton](#):
>
> > [@](#):
> >
> > Is it the one you defined for that trait? Or is it still hanging around  
> > internally even though it’s deleted from the module’s tree?
> 
> I added three new prototype definitions A, B, C. Go to a prototype and all 3 correctly appear, select A. Close the prototype. Delete prototype definition C. Go back to a prototype and C still appears in the drop down list.

Yea, when you delete a prototype from the module, Vassal doesn’t delete it from it’s internal data store. I’ll have to fix that as well.

---

<div class="post-metadata">

**Author:** ![jimcot](https://forum.vassalengine.org/letter_avatar_proxy/v4/letter/j/ecb155/32.png) [@jimcot](https://forum.vassalengine.org/u/jimcot)\
**Post date:** [January 30, 2010, 3:38am UTC](https://forum.vassalengine.org/t/new-patch-in-my-branch-for-inclusion-in-trunk-and-3-1-branch/2746/11 "2010-01-30T03:38:24Z")

</div>

Ok, I fixed it to remove prototype definitions that are deleted. You shouldn’t see any more phantom names in the list.
