creating a message box
i can create a message box but how do i set it’s contents ? i can send it a set message but how do i do it during its creation ala newdefault.
when i set with a set message i get double quotes, how do i get rid of these?
I got rid of the quotes, still wondering how to set a message box’s contents on creation.
Please post an example of what you’re currently doing.
Try something like these examples, the first one is like sending a message to [thispatcher] and the other uses newdefault
var myobj = this.patcher.message("script","newobject","message","@text","hello");
var myobj = this.patcher.newdefault(300,400,"message","@text","hello");
cheers lh, that’s what i was looking for
I’m having a hard time figuring out how do make messages like "rate $1".
Obviously, these don’t work for me:
var mess1 = this.patcher.newdefault(50,150,"message", "@text", "rate $1");
var mess1 = this.patcher.newdefault(50,200,"message", "@text", "rate", "$1");
Help will be appreciated.
var myobj = this.patcher.message("script", "newobject", "message", "@text", "rate $1"); should work for you.
Yes, it does, thank you. Wonder why the newdefault method doesn’t work like this, though. I know I had it working that way also, at one point, but then I broke it when I rewrote some code yesterday.
@lut lei I had that problem with new default too. Thanks lh
I guess using newdefault have few advantages over newobject, when it comes to messageboxes, anyway.