Forums > MaxMSP

"varname" is not a valid attribute argument — WTF??/Bug report

August 25, 2011 | 12:48 pm

I’m trying to instantiate objects, setting the varname attribute in the object box as follows:

— Pasted Max Patch, click to expand. —

but this just gives errors in the Max window.

Is this a bug or not?

Summary: Can’t set varname attribute as part of the argument/attribute list in an object box.

Sample patch: see above

Expected behavior: objects with a "@varname" setting in the object box are instantiated with the varname attribute set accordingly

Actual behavior: Error messages in Max window; attribute not set.

System: Max/MSP 5.1.8 (45300); iMac running Mac OS 10.6.8

August 25, 2011 | 5:53 pm

I’m not a Jitter guy, so forgive possible wrongheadedness, but I don’t see a "varname" attribute for these objects. I see a "name" attribute, though.

August 25, 2011 | 6:09 pm

Scripting Name. Every object in Max has one.

The actual name for this attribute (if you click the ampersand at the left of the toolbar in the bottom of an object’s Inspector window to reveal the internal attribute names) is ‘varname’. This is also the field of the Inspector that Max jumps to when you select an object and hit Cmd-apostrophe (‘) for the Object->Name… menu.

The Jitter matrix name is another animal. That, indeed, is simply called ‘name’. Not the guy I’m lookin’ for, though.

August 25, 2011 | 6:18 pm

Sorry Peter, this is somewhat arcane, but varname and other "box" attributes aren’t possible to set via object box text, or by direct message. In part this is to avoid potential naming conflicts and ambiguities that might arise from a box attribute and the underlying object’s attribute.

So the simple answer is that this isn’t possible due to the separation of a box and its contained object, and it won’t be changed soon.


August 25, 2011 | 6:23 pm

Ahh. Well, using the "drag name out of inspector" trick, it looks like the varname has to be sent using "sendbox," which I don’t know if it’s possible to do with attributes.

— Pasted Max Patch, click to expand. —

=== edit ===
What Joshua said.

August 26, 2011 | 12:15 am

"but varname and other "box" attributes aren’t possible to set via object box text, or by direct message."

Was wondering about that, it seems like as the number of attributes grows, it makes one wonder why all attributes aren’t settable in the same way that some are, using the @notation. That’s fine, but it has been a bit confusing at times…which can be, and which not?

Great that the Jitter objects seem to be all (mostly?) on the same page, whereby one can set any listed attribute (from the popup, not the Inspector) using @.

Maybe that’s the confusion, the Inspector leads one to believe that one can set any of those, but in reality only a few are available using @.

May 2, 2015 | 8:27 am

In a new created patcher (with at least one inlet), it’s not possible to set the scritpting name also using the external command (sendbox varname $1)… no way…
It seems more a bug!

— Pasted Max Patch, click to expand. —
Viewing 7 posts - 1 through 7 (of 7 total)

Forums > MaxMSP