One way the token method saveMacroButtonProperty() in Token.java is called is when changes to a token macro are applied (see MacroButtonProperties.java).
I've noticed that this method doesn't appear necessary to save/apply changes to a token macro. In fact, I've only seen this method been useful when trying to create a new token macro.
I'm trying to find out what the purpose of saveMacroButtonProperty() is. Does anyone know?
The reason I'm asking is that currently, a null pointer exception is thrown when applying a change to a macro on a different map. I found a way to remove the error but that would mean skipping saveMacroButtonProperty(). I'm trying to find out what the side effects of that might be.
saveMacroButtonProperty for Token - What does it do?
Moderators: dorpond, trevor, Azhrei
saveMacroButtonProperty for Token - What does it do?
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: saveMacroButtonProperty for Token - What does it do?
With just a quick glance at the code I would say it is because most of the method is about making sure that the GUI updates and the clients are updated.
When testing these kinds of issues, you need to test both with and without a server running. With a server running you need to have one or more clients connected so that you can verify the clients are being updated appropriately.
When testing these kinds of issues, you need to test both with and without a server running. With a server running you need to have one or more clients connected so that you can verify the clients are being updated appropriately.
Re: saveMacroButtonProperty for Token - What does it do?
You are right, I checked it out and it doesn't update the macro for clients.
MT Framework: Call of Cthulhu 7th fork, D&D 5e Spell Library
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
MT Scenario: Uncle Timothy's Will.
MT Utilities: Handouts, VBL Move Block, Date.
Re: saveMacroButtonProperty for Token - What does it do?
Yeah. That's the kind of thing that has bitten us many times in the past.