pattr bindto problem…

Jan 15, 2006 at 8:29pm

pattr bindto problem…

I am trying to bindto a slider in my patcher. The problem I am
encountering is that when I do a loadmess and send a message
to the pattr it fails. It seems as though the loadmess gets sent
before the pattr gets a chance to bindto the object. This
initialization dependency causes the pattr to be permenantly
disabled. Is there a way I can get notification when the patcher
is completely done instatiating everything so that I can send
a message to the pattr? I have pasted an example below:

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 241 42 841 442;
#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#P newex 65 53 61 9109513 loadmess 64;
#P number 140 53 35 9 0 127 3 139 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 100 94 112 9109513 pattr bindto parent::slider;
#X prestore 1 0 77;
#P objectname bindto;
#P fasten 1 0 0 0 145 81 105 81;
#P fasten 2 0 0 0 70 81 105 81;
#P pop 1;
#P newobj 196 120 35 9109513 p child;
#P objectname child;
#P user hslider 108 83 23 206 128 1 0 0;
#P objectname slider;
#P window clipboard copycount 2;

#23931
Jan 17, 2006 at 8:18am

Until a better solution is built into pattr itself, putting a
“deferlow” object between the loadmess and the pattr object fixes this.

jb

#P window setfont “Sans Serif” 9.;
#P window linecount 1;
#N vpatcher 241 42 841 442;
#P window setfont “Sans Serif” 9.;
#P newex 65 76 50 196617 deferlow;
#P newex 65 53 61 196617 loadmess 64;
#P number 140 53 35 9 0 127 3 3 0 0 0 221 221 221 222 222 222 0 0 0;
#P newex 98 106 154 196617 pattr foo @bindto parent::slider;
#X prestore 1 0 64;
#P objectname foo;
#P connect 2 0 3 0;
#P connect 1 0 0 0;
#P connect 3 0 0 0;
#P pop;
#P newobj 196 120 35 196617 p child;
#P objectname child;
#P user hslider 108 83 23 206 128 1 0 0;
#P objectname slider;
#P window clipboard copycount 2;

#68406

You must be logged in to reply to this topic.