Place markers deleted?

I have a module that has cash. I added the ability to change out a higher denomination for a lower denomination using place markers functionality. The problem is that when I delete another piece of money it deletes the placed markers too.

So for example say I have three $10,000 bills. I right click on one of them and select the get change menu option. That menu option uses the place marker functionality to place two $5,000 bills on the $10,000 bill. I then use a sort function (similar to the monopoly game module) to separate the place markers from the $10,000 bill. I then delete the $10,000 bill. All of that works perfectly fine. So at this point I should have two $10,000 bills and two $5,000 bills. The problem is that if I now spend one of the remaining two $10,000 bills which issues a delete command for it, it will also delete the two $5,000 bills.

Does anyone know why it is doing that? I can provide an example of the module if needed.
Is there an easier way to achieve the functionality I want to achieve i.e. providing change from higher denominations?

Thanks,
John

Sounds like it could be a key command collision. Try using different key
commands for the different delete methods.

i.e when making change use SHIFT D to delete the higher currency but when
spending the higher currency use a different delete trait with a CTRL D key
command

It also sounds like you may still have the $5000 bills still selected in
which case they would delete also if they have the same delete command

-----Original Message-----
From: messages-bounces@vassalengine.org
[mailto:messages-bounces@vassalengine.org] On Behalf Of joja15
Sent: Tuesday, February 22, 2011 8:26 PM
To: messages@vassalengine.org
Subject: [messages] Edit: [Module Design] Place markers deleted?

[This message has been edited.]

I have a module that has cash. I added the ability to change out a
higher denomination for a lower denomination using place markers
functionality. The problem is that when I delete another piece of money
it deletes the placed markers too.

So for example say I have three $10,000 bills. I right click on one of
them and select the get change menu option. That menu option uses the
place marker functionality to place two $5,000 bills on the $10,000
bill. I then use a sort function (similar to the monopoly game module)
to separate the place markers from the $10,000 bill. I then delete the
$10,000 bill. All of that works perfectly fine. So at this point I
should have two $10,000 bills and two $5,000 bills. The problem is that
if I now spend one of the remaining two $10,000 bills which issues a
delete command for it, it will also delete the two $5,000 bills.

Does anyone know why it is doing that? I can provide an example of the
module if needed.
Is there an easier way to achieve the functionality I want to achieve
i.e. providing change from higher denominations?

Thanks,
John


Read this topic online here:
https://forum.vassalengine.org/t/place-markers-deleted/3688/1

I will check that out Tim. Thank you for the tips.

One question. Are place markers associated with the piece that they were placed on or once moved is there no longer any association between the placed pieces and the piece they were placed on?

Thanks,
John

OK, I checked it out and I think it is what you were saying about all the pieces were selected.