Cycling74 / min-devkit

Tools, documentation, and reference implementation of a Max Package built using the Min-API.
MIT License
161 stars 31 forks source link

Adding new messages doesn't seem to work for UI controls #217

Closed yeswecan closed 4 months ago

yeswecan commented 4 months ago

Before filing a report

I'm on the latest version of min-devkit, I made sure to pull and rebuild everything.

Describe the bug

I tried adding a new message to a number of classes and it only happens to work with non-ui objects.

To Reproduce

Add this message to the external object:

    message<> something { this, "something",
        MIN_FUNCTION {
            cout << "something was called!";
            return {};
        }
    };

Try to send something to the object. You will see the message posted only if it was not UI object.

Expected behavior

UI objects are expected to work just as non-UI ones, I suppose?

OS:

OSX 14.2.1

Additional context

Max 8.5.6

isabelgk commented 4 months ago

Hi @yeswecan ,

~If you use something other than cout << "foo", does it still not behave as expected? I could reproduce not getting a post from the UI object, but I could stop on a breakpoint in the function and do other things as expected (like an output.send() to an outlet).~

I think perhaps the issue is that you're not using endl at the end of the string you're trying to post. I'm able to reproduce your issue if I use your code exactly, but it works if I do cout << "foo" << endl; in a ui object.