Feature Request #790
subpatchers and namespace encapsulation
|Assignee:||Théo de la Hogue||% Done:|
|Target version:||MVC for 0.6|
in order to develop while playing, or playing while developing, it would be extremely useful to use jcom.hubs in patchers, and not only in abstractions.
this is already possible by giving the name of the desired node as argument of jcom.hub, but there is a problem : the node name has to be prepended to all the parameter names
this implies that, when using different namespace levels, all parent levels have to be prepended to parameters....
this is not very nice, and also inconsistent with the way relative/absolute addresses work
a potential solution to this problem would be to use subpatcher encapsulation to define the different namespace levels
2 attached patchers show how things are currently behaving, and how I believe it should behave...
#1 Updated by Pascal Baltazar almost 7 years ago
- File testSub.maxpat added
- Status changed from New to Resolved
thanks Théo, it works !
there's only one thing, I don't know if that's a bug or a limitation due to Max behaviour :
- jcom.hubs and parameters cannot subscribe until the patcher has been saved :
jcom.hub: Can't get the class from the patcher. Subscription failed
jcom.hub: Jamoma cannot register
jcom.parameter: Can't get the class from the patcher. Subscription failed
jcom.parameter: Jamoma cannot register toto
a few limitations we also have to document :
- the name of the node of jcom.hub is based on the name of the patcher
- jcom.hubs have to be created first, in order for the jcom.parameters in the same patcher (or below) to subscribe to them
- when a subpatcher is duplicated and renamed, jcom.hub keeps the name of the original subpatcher, until it is rebuilt (by reloading the patcher, or cutting/pasting the subpatcher)
I guess these cannot be overcome.... as it seems to depend on the way Max is designed concerning subpatchers - please confirm and then close the FR is that's the case....
#2 Updated by Théo de la Hogue almost 7 years ago
great news !
actually there is a limitation into the code so I proposed to remove this limitation
by using a default class name like in Max : "Untitled" so the subscription process can go ahead and the problem
considering the other points I'm agree : it have to be documented.