how to use bringtofront from javascript?
Can't seem to find this... I am dynamically creating messageboxes that need to be on front over a panel and other stuff that's already in the patcher. Creation, placing, connecting to another box and filling with text from javascript goes great but the new messageboxes remain in the background, and I can't seem to figure out how to use bringtofront...
Does anyone know how to solve this?
cheers Hans
Hi Hans,
A) What have you tried already and what output do you see in the console when you try it?
B) https://cycling74.com/forums/js-versus-thispatcher-re-scripting-names ?
Cheers,
Tyler
Hi Tyler , the thing is I couldn't really find any documentation... I had not found the link you've put under B - I did try similar things but not exactly this no...
I don't think I tried using bringtofront as a method and including the getnamed after that.. not sure though... tried a lot of things :-)
So what I did as a workaround was use the thispatcher object and use a message box that I trigger from the javascript object but that feels kinda clumsy ...
But will try again according to your B link...
One other thing if I may - is there a way from javascript to find out which object is clicked?
In HTML/Javascript you'd give the object a onClick but how is that done in Max Msp?
Thanks! Hans
Hey Hans,
I feel your pain, it's a little harder to find the JS object docs than the docs for Max objects so I ended up just making cheat sheets and lots of bookmarks. For future ref: https://docs.cycling74.com/max7/vignettes/jspatcherobject
Unfortunately I don't know of a solution for the latter question (which certainly doesn't mean there isn't one). Probably worth a separate topic :)
Cheers,
Tyler
Hey Tyler - nice link - thanks!!
Ya JS docs is indeed sparse... thanks for the help anyway! The bringtofront method works great - so code could already be cleaned up....
The biggest problem is that coming from sort of a programming background (PHP, Javascript for web and some C++) you know what you want to do, but it can be quite frustrating to not be able to find documentation on the subject...
Thanks again - will open new topi for clickOn !!
Cheers Hans