So I'm working on a Max for Live device that lets the user expand the interface by creating bpatchers and lengthening the device ("devicewidth" message to [live.thisdevice]) to accommodate the expanded interface. I'm doing the object creation in js with patcher scripting like this.patcher.newdefault to create the bpatchers.
My problem is that when the user saves and reloads the live set, everything is forgotten, the device width is reset to default and all the created bpatchers are lost. It wouldn't be much of a problem if I could get away with just recreating everything manually to its previous state but I need the bpatcher contents to be automatable and not lose that automation when the set is closed.
Is there some setting that I'm missing? How do I get Live to remember newly created objects?