[javascript-dev] get patcher name (again)
gusanomaxlist
gusanomaxlist at googlemail.com
Tue Jul 17 06:28:33 MDT 2007
- Previous message: [javascript-dev] Re: JSUI and inlets/outlets
- Next message: [javascript-dev] get patcher name (again)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Hi.
1st of all, sorry if this sounds very easy and stupid to you but these are my very first steps into JS.
I'm trying to get a bpatcher scripting name from inside of it.
I've searched on the javascript list and tried different scripts but can't get it working.
Now I have a really simple js and I place it inside a named bpatcher and I only get <undefined> when I ask for his scriptname.
If someone could have a look at the following example...
(I also have the js inside a patcher to compare)
____________________________________
getname.js
function bang()
{
post(this.patcher.varname);
}
____________________________________
testgetname.pat
#P button 36 36 15 0;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P newex 36 68 54 9109513 js getname;
#P connect 1 0 0 0;
#P window clipboard copycount 2;
____________________________________
main patcher
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#N vpatcher 39 284 188 448;
#P button 36 58 15 0;
#P window setfont "Sans Serif" 9.;
#P newex 36 87 54 9109513 js getname;
#P connect 1 0 0 0;
#P pop;
#P newobj 212 252 36 9109513 p none;
#P objectname wow;
#P bpatcher 105 93 100 100 0 0 testgetname.pat 1;
#P objectname blah;
#P window linecount 3;
#P comment 257 252 100 9109513 this patcher is also named and it also doesn't work;
#P window clipboard copycount 3;
Thanx.
- Previous message: [javascript-dev] Re: JSUI and inlets/outlets
- Next message: [javascript-dev] get patcher name (again)
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
