Sorry this post wasn't meant as a reply

Feb 8, 2006 at 6:49pm

Sorry this post wasn't meant as a reply

Hi
just went to the online forum and saw my posting was in a wrong
thread. I had read about it, but I wasn’t aware and used the reply
button.

Sorry, this question has nothing to do with sharingisfun’s “make a
js array patch” [message #62117].

My question:
I tried to create new panel objects using javascript:
var a = this.patcher.newobject(“panel”,100,100,12,12);
From this I get: error: patcher: doesn’t understand “panel”.

It works when I do it with a toggle: var a =
this.patcher.newobject(“toggle”,100,100, 15, 0);
So I checked by stepping trough the patchers objects using the apply
method. I get for the Maxobj property maxclass for some of my
objects the word “panel”.
In Max text mode I get for a panel: #P user panel 180 167 12 12;
When I try to script to a thispatcher object with the message “script
new mypanel panel 100 100 12 12″ I get the same error message.

Is it impossible to create panel objects dynamically?
Stefan

#24333
Feb 8, 2006 at 7:57pm

>I tried to create new panel objects using javascript:
>var a = this.patcher.newobject(“panel”,100,100,12,12);
>From this I get: error: patcher: doesn’t understand “panel”.
>
>In Max text mode I get for a panel: #P user panel 180 167 12 12;

Try this:
this.patcher.newobject(“user”,”panel”,100,100,12,12);

Roby

#70243
Feb 8, 2006 at 10:10pm

That works, thanks Roby

>Try this:
>this.patcher.newobject(“user”,”panel”,100,100,12,12);

Stefan

#70244

You must be logged in to reply to this topic.