Forums > MaxMSP

Minor Bug: using pvar to change comment text

June 28, 2007 | 6:08 am

I am cleaning up some patches with pvar. I have labels whose text can change. I am using named comment objects for the labels, and tried passing "set new text" into a pvar bound to the comment object. It works fine once or twice, and then any additional text changes draw over top of the existing comment text. The following patch demonstrates (click back and forth between the two message boxes a few times). I see this behavior in version 4.6.3 on OS X 10.4.10 and version 4.6.2 on Windows XP. Once I open the patch for edit it corrects itself until the next time text is set.

I guess the workaround options are to use a message box or read-only textedit for my labels, or update the comment object with scripting.

max v2;
#N vpatcher 584 494 952 787;
#P window setfont "Sans Serif" 9.;
#P window linecount 1;
#P message 122 96 67 196617 asdfasdfasdf;
#P message 41 92 70 196617 blah blah blah;
#P newex 78 131 62 196617 prepend set;
#P newex 78 159 60 196617 pvar comm;
#P window linecount 2;
#P comment 65 50 100 196617 Here’s a comment named ‘comm’;
#P objectname comm;
#P connect 4 0 2 0;
#P connect 3 0 2 0;
#P connect 2 0 1 0;
#P pop;


June 28, 2007 | 6:38 am

A ";max refresh" takes care of this issue, if you sent it after every
comment change…but you are right, funny little bug.

On Jun 27, 2007, at 11:08 PM, Adam Murray wrote:

> max v2;
> #N vpatcher 584 494 952 787;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 122 96 67 196617 asdfasdfasdf;
> #P message 41 92 70 196617 blah blah blah;
> #P newex 78 131 62 196617 prepend set;
> #P newex 78 159 60 196617 pvar comm;
> #P window linecount 2;
> #P comment 65 50 100 196617 Here’s a comment named ‘comm’;
> #P objectname comm;
> #P connect 4 0 2 0;
> #P connect 3 0 2 0;
> #P connect 2 0 1 0;
> #P pop;


barry threw
Media Art and Technology
http://www.barrythrew.com
me(at)barrythrew(dot)com
857-544-3967

And I know not if, save in this, such gift be allowed to man,
That out of three sounds he frame, not a fourth sound, but a star.
-Robert Browning


June 29, 2007 | 10:01 am

There are more of these refresh problems in max. When building an elaborate dynamic interface this can cause real problems. I’d say the issue as a whole shouldn’t be filed as a minor bug but as a major bug.

Mattijs

Quote: adamj wrote on Thu, 28 June 2007 08:08
—————————————————-
> I am cleaning up some patches with pvar. I have labels whose text can change. I am using named comment objects for the labels, and tried passing "set new text" into a pvar bound to the comment object. It works fine once or twice, and then any additional text changes draw over top of the existing comment text. The following patch demonstrates (click back and forth between the two message boxes a few times). I see this behavior in version 4.6.3 on OS X 10.4.10 and version 4.6.2 on Windows XP. Once I open the patch for edit it corrects itself until the next time text is set.
>
> I guess the workaround options are to use a message box or read-only textedit for my labels, or update the comment object with scripting.
>
> max v2;
> #N vpatcher 584 494 952 787;
> #P window setfont "Sans Serif" 9.;
> #P window linecount 1;
> #P message 122 96 67 196617 asdfasdfasdf;
> #P message 41 92 70 196617 blah blah blah;
> #P newex 78 131 62 196617 prepend set;
> #P newex 78 159 60 196617 pvar comm;
> #P window linecount 2;
> #P comment 65 50 100 196617 Here’s a comment named ‘comm’;
> #P objectname comm;
> #P connect 4 0 2 0;
> #P connect 3 0 2 0;
> #P connect 2 0 1 0;
> #P pop;
—————————————————-


Viewing 3 posts - 1 through 3 (of 3 total)