object_post with different name

Jun 25, 2010 at 10:41am

object_post with different name

Hi folks.

I wish to be able to post things in the max window with an arbitrary symbol in the “Object” column – just like [print] does.

Is there a way to do it?

thanks!
aa

#51052
Jun 25, 2010 at 2:37pm

The easiest way is to create a print object using object_new() and then send messages to it using object_method().

Cheers,
Tim

#183170
Jun 25, 2010 at 4:11pm

But if I’m not wrong this wouldn’t allow me to double-click a line in the max window and have my object highlighted.
… or am I wrong?
aa

#183171
Jun 25, 2010 at 8:12pm

@andrea: true.

I guess I’m not sure what exactly you are trying to do or why you are trying to do this. However, the ecology of the Max environment is such that people expect the object name to be in the left column and any other info to be in the right column. So it’s generally advised to follow the convention that everyone expects and the API doesn’t make a lot of accommodation for doing otherwise.

best wishes,
Tim

#183173
Jun 26, 2010 at 6:31am

Tim,
I see your point.

What I’m trying to do is implementing a custom data type (thank you for your articles on 74objects, btw!), and having a “post” object that mimics as closely as possible the behaviour of print – so, in fact, I think I am totally respecting the Max ecology! ;)

imho, the API should ideally allow for virtually every behaviour implemented in the native Max objects. While this may not be fully applicable in very extreme cases (I understand grab is one of those), I think that in general it should be left up to the developer’s choice if and how much to deviate from an average “standard” behaviour for a specific purpose. In fact, it’s true that this is basically what already happens, but I’d love to have even more…

Thank you anyway!
aa

#183174

You must be logged in to reply to this topic.