Fix element list updates #21
Loading…
Reference in New Issue
Block a user
No description provided.
Delete Branch "outline-update-fix"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
The incoming branch address issue #20 by making the following changes:
If we switch to a system where multiple assemblies can be loaded at the same time, we can use the storage key of the current assembly in place of the serial number of the current assembly.
If you'd prefer, you could just have each Assembly grab a serial number from the state when it is created (updating the serial number in the process). Then you will get a unique key for each entity in each assembly, no matter how dyna3 may be refactored. (You might have an objection that a serial number isn't part of a platonic universe, but even universes need addresses. The serial number won't interact with the contents of the universe in any way, so it's an engineering convenience, not a problem.)
Anyhow let me know if you'd rather change to that scheme, or have me review the code as is. Should be quick on my end either way, there's not too much to this PR.
That would simplify the code a little, and it might have a slight advantage over using storage keys to identify assemblies in the future: we wouldn't have to worry about storage keys getting re-used.
I'll switch to that system.Edited: actually, I'd prefer not to switch, for the reasons discussed below.Whoops, I just remembered why I didn't store the serial number in the assembly. Right now, for simplicity, the application state just contains one fixed
Assembly
object. There's no code for replacing thatAssembly
with a new one. The example-building routines work by removing all the elements in the assembly and then adding new elements.I did this because adding code to replace the
Assembly
would require changes throughout the program, which felt outside the scope of this PR. It's likely that those changes would have to be reconsidered when we design a proper system for loading assemblies.In light of that, please review the code as it is.
As we discussed in our meeting today, this PR has been superseded by #22. I'm keeping the
outline-update-fix
branch in case we decide later that we'd rather use this alternate approach.Pull request closed