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

Aug 25, 2011 at 12:48pm

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

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

#58617
Aug 25, 2011 at 5:53pm

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.

#210694
Aug 25, 2011 at 6:09pm

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.

#210695
Aug 25, 2011 at 6:18pm

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.

-Joshua

#210696
Aug 25, 2011 at 6:23pm

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.

#210697
Aug 26, 2011 at 12:15am

“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 @.

#210698

You must be logged in to reply to this topic.