Cycling74 / min-devkit

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

Multiple inlets/outlets #147

Open mourendxu opened 4 years ago

mourendxu commented 4 years ago

Hi, it seems issue #130's fix hasn't been propagated to http://cycling74.github.io/min-devkit/guide/writingobjects

It's still missing the semicolon.

Also, I find that even if I add the semicolon, I would get a compile error with regard to xmemory. Errors below: >D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\xmemory(671,1): error C2280: 'std::unique_ptr<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>,std::default_delete<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>>>::unique_ptr(const std::unique_ptr<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>,std::default_delete<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>>> &)': attempting to reference a deleted function 2>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1912): message : see declaration of 'std::unique_ptr<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>,std::default_delete<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>>>::unique_ptr' 2>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\memory(1912,5): message : 'std::unique_ptr<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>,std::default_delete<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>>>::unique_ptr(const std::unique_ptr<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>,std::default_delete<c74::min::outlet<c74::min::thread_check::any,c74::min::thread_action::assert>>> &)': function was explicitly deleted 2>D:\Program Files (x86)\Microsoft Visual Studio\2019\Community\VC\Tools\MSVC\14.24.28314\include\vector(688): message : see reference to function template instantiation 'void std::_Default_allocator_traits<_Alloc>::construct<_Ty,const _Ty&>(_Alloc &,_Objty *const ,const _Ty &)' being compiled

However, trying the original poster's method of creating the object directly in the call to push_back worked. No compile errors and runs fine.

Lastly, it would be great to add a note in the documentation that number of inlets and outlets can ONLY be adjusted in the constructor. I think the language in the current doc isn't explicit enough. Though, it only took me a few sec to figure out doing it in an attribute's setter doesn't work :)

Thanks

robtherich commented 3 years ago

not sure why the github.io docs did not pick up the change. thanks for pointing that out.

robtherich commented 3 years ago

github.io docs should be properly updated now.