Package patcher load resize js stopped working
Hello
I've a patcher package with dirs
/init/objectmappings.txt
/patchers/pollen.eq.maxpat
/patchers/resize_this_patcher.js
The js contains:
function resize() {
this.patcher.box.varname = "bp_" + Math.random()*10000;
this.patcher.parentpatcher.message("script", "sendbox", this.patcher.box.varname, "patching_size", 70, 70);
this.patcher.box.varname = "";
}
The objectmappings.txt contains
max objectfile pollen.eq pollen.eq;
max definesubstitution pollen.eq bpatcher @name pollen.eq.maxpat @offset -20. -20.
When I open a patcher having restarted Max, and do a new object and select pollen.eq I get a standard 128x128 px bpatcher. The js resize function is being ignored. I've tried with and without defer. This was working, but has stopped working. I'm on 8.5.6. How can I make the UI component resize when I drop it into a parent patcher?



I've tried to move the resize_this_patcher.js into a subdirectory called javascript in line with https://docs.cycling74.com/max8/vignettes/packages?q=package but after restarting Max 8.6, I got the same. I'm unsure what I'm missing here to make the javascript work.
This generally appears to be working here, but I might be missing something important. Can you attach a simple example?
OK this is interesting - I will cross post, as I'd forgotten I'd raised the original problem I had here in another post.
The package works OK when I use a brand new patcher, but when I use my mother patcher which has been hanging around for a couple of months waiting for me to complete the package components, it does not.

There's not anything wrong with the Max paths as both patchers will use the same path. I triggered the deployment of both bpatchers using 'n' as before. It appears that basically, the javascript is not being triggered by my main mother desk patcher, but is by a brand new mother.
OK one of the patchers was in presentation mode, and one was in patching mode. Perhaps I should not have the background the same colour as the modes are getting quite similar to each other.