jamoma / JamomaMax

Implementation of Jamoma for Cycling'74 Max:
http://www.jamoma.org
41 stars 9 forks source link

j.view: auto binding address #927

Open theod opened 9 years ago

theod commented 9 years ago

reporting what @lossius says on the devel list :

"As I have been making a bunch of views that embed other views lately (I find this a useful way of reusing existing views rather than making new inspectors for stuff), and having reported on and tested for a number of issues, I have a proposal for a workflow regarding naming of views within views that might be more convenient than at current:

90% of the time I either want a view emedded within a view to

a) be named the same as the other view (two examples are the panel in dbap=.view and the larger and editable equalizer view) b) expose a submodes of the model (some examples are the limiter~.view accessible from the panel in e.g. output~.view and spectral_shift~.view.maxpat. or the hipnoscope~.view that is embedded in amogwai~.view

I very often end up having to add a bunch of objects to ensure that I get the address right. Typically this looks like this (for the (a) case):


----------begin_max5_patcher----------
345.3ocySssaBCCC84zuhn7bGpsvJW9UlPSgFuQPgjpjTnHD+6qwoUCPnotK
OrGZir8w1Gehy4DBaioEbL5J5KTB4bBgftBNH81D1ddakh6PXLMbzrYGKMFx
Csdzs.dCrJywg.5l8RsB7XR48Nq49psR86uZgJeroSKmjkRyyWDNdFMJJljQ
W2mhTfkuqkOkO6phaZ72Wcm+jBPzC3hf7mpgXyXL55PjKIIgeo+tQt1B0fVP
2aDfZEWHrPWB+r4e1R7X57uR.V9+Z92MoaL.4A3uPAVTNBAHu3wJvzugBj1+
ciRfMioj56eKf7M3+V4wYZrUCkbX2j9ImEfyK0buznuBzxavrUJD.FNaHKoi
uQA37l8v6oQSmhQPm63734STs300G.qqulHU5Va1YrAy4onoTGMwJxrvA4.9
RzC21sM36VEZrw6s1x3ibVXkxpaj3xSRnyWR9.vNTYgB
-----------end_max5_patcher-----------

or this for the (b)-case:


----------begin_max5_patcher----------
404.3ocyTkraBCCD8bxWgkk5sTJgzFVt0uiJTkIdnXTvNx1gkh3eu1iSTYSU
.sphCwJyLuY48xDuMNhNQsFLTxHxajnnswQQnKuinF6H5B15hRlAgQkvJ0j4
zjPHKr1ht4vTPWpV0FPVuPHKAKlTZiyJlsXlP9w6ZnvFZZ+zgc5lPx64OeI2
e1y8NYbSJBNVdWKeLKcuhqpsGWcicSIfnawE.Y2TAglQojw9H6hi8GI+NJap
zBocJ4AySyDURkoP4Zzsw+gH+S6M3mDf6L9WogJPxIKTbnbDiy0fKgai+MLO
Mq+IBvTkzZDehTH0KSmnKCo6AUxVDDgW0BV48khMuii3fXI7mnYYY2tjM3Zk
rrqPxRZdNP5vgiVJjGecCRPu+C0SipVWzVxlQl7ME4fwJjLqPI2Ci+Jh8.MS
v4.FuUB3BCaRIfBQ2y9g8RGmiZ04mm+uw4Rllg23zD9zwppVBZSSIwAwszOW
o8l8SPSgLXhUjpgkhV74nGl1sKacKx05vRz57mogTc+Pnk0BbkM124cwek47
IhC
-----------end_max5_patcher-----------

Would it be possible, when embedding a view within a view, that the embedded view simply inherits the name of the outer view? And if the inner view is passed an argument, then that would be appended to the address, so that e.g. an embedded [limiter~.view limiter] within the view for a /foo model will by default become a /foo/limiter view?

Most of the time, this would be sufficient to connect the views to the correct model, and if I need to do something else, then I could start configuring."

theod commented 9 years ago

I would say it was working like you propose so maybe something is broken… I’ll look into it.

theod commented 8 years ago

ok so the a/ case doesn't work but we can imagine a convention "if no argument, bind on the same address than the upper view".

about b/ case it works and use the first argument as relative address to bind on a subnode of a model.

I'm working on a/ case

theod commented 8 years ago

@lossius it needs to be tested now @jln- and to documented too even if it is a very advance feature.

jln- commented 8 years ago

Can you make a ticket assigned to me linking to this issue ?

theod commented 8 years ago

done !