'@bgfillcolor', 0.3, 0.3, 0.3, 1 doesn't work for the [message] object
Hi all,
I try to make a message object from Javascript. I have found, the bgfillcolor attribute doesn't work. I always get the default colour.
I have tried this way :var message = this.patcher.newdefault(x, y , 'message',
'@bgfillcolor', 0.3, 0.3, 0.3, 1)
And also this way:
var message = this.patcher.newdefault(x, y, 'message');
value.setattr('bgfillcolor', 0.3,0.3,0.3,1);
Something like this should work:
var message = this.patcher.newdefault(x, y, 'message');
message.setattr('bgfillcolor', 1,0.3,0.3,1);
Hi,
What is the difference comparison to my code, please?
It looks like you were trying to use setattr() on something other than the message box, 'value'?
Hi,
Oh sorry, it's just an error when rewriting the code here. My bar is named value. To make it clear, I changed the var to message here, but not in both cases. Sorry.
Maybe send along the whole code, as it is working here.
Hi,
The code is like this:var message = this.patcher.newdefault(x, y, 'message',
'@varname', 'message',
'@presentation_rect', x, y + 40, 40, 20,
'@annotation', 'message',
'@textjustification', 1,
'@bgfillcolor', 0.3, 0.3, 0.3, 1,
'@presentation', 1);
And I have also tried this:var message = this.patcher.newdefault(x, y, 'message');
message.setattr('bgfillcolor', 0.3,0.3,0.3,1);
None of them is working on my side here (Max 8.3).
Hmm, not sure what could be going on. You could attach a project with all of your dependencies, I'd be happy to take a look.

Hi,
OK, you are right. It works in the empty script. Then I have to do something wrong in the function before.
Thank you