creating a message box

Mar 30, 2009 at 2:19pm

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?

robin xx

#43106
Mar 30, 2009 at 2:26pm

I got rid of the quotes, still wondering how to set a message box’s contents on creation.

#154491
Mar 30, 2009 at 4:17pm

Please post an example of what you’re currently doing.

#154492
Mar 30, 2009 at 6:55pm

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”);

lh

#154493
Mar 30, 2009 at 7:29pm

cheers lh, that’s what i was looking for

#154494
Apr 1, 2009 at 10:57pm

I’m having a hard time figuring out how do make messages like “rate $1″.

Obviously, these don’t work for me:

function makemess(){
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.

#154495
Apr 2, 2009 at 12:34am

var myobj = this.patcher.message(“script”, “newobject”, “message”, “@text”, “rate $1″); should work for you.

lh

#154496
Apr 2, 2009 at 7:06am

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.

#154497
Apr 2, 2009 at 10:11am

@lut lei I had that problem with new default too. Thanks lh

#154498
Apr 2, 2009 at 10:43am

I guess using newdefault have few advantages over newobject, when it comes to messageboxes, anyway.

#154499

You must be logged in to reply to this topic.