-
-
Notifications
You must be signed in to change notification settings - Fork 2.6k
fix(ofParameter): better default init() handling of non-comparable/non-copyable objects and containers #8325
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
Hi @artificiel I found that with this change it stills fails to compile |
Wow - that's a wild type to try and use. :) Or is that to illustrate a bigger issue? |
I know is a wild type to use.... The story behind it is that in ofxOceanode, we wanted to make it fast and easy to convert of sketches (apps with minimal code) to oceanode nodes. So you can have modulation, osc control, midi functionality and preset system without much effort. That meant that
Concerning this pull request, I just wanted to illustrate that still not all types can be compiled due to the addition of init() / reinit() and related to non-comparable/non-copyable objects. Objects that in 0.12.0 where valid ofParameter types and could be compiled. |
Thanks for the explanation @eduardfrigola ! |
@eduardfrigola haha indeed a vector as ofParameter is somewhat out there, but it's good to exercice the pattern. I don't mind at all getting odd cases as it augments malleability, and one (personal) goal is to maximize expressivity on the user side, and enabling un-planned use is a good measure of such expressivity. again this init() stuff is new anyway so it's the right time to figure out things. so please test the current PR again before it gets merged, and throw other funny things at it if you have them. (also, I dived into ofParameter/ofEvent in an attempt to squeeze more expressivity in the type, but discovered some limits inherent to the design, which is actually a coupled cluster (ofxGui etc.). the behaviour you need (a observable container of heterogeneous classes, including itself) is supported by ofParameterGroup, but it should probably be extracted into a more generic Tree-type class, but the class hierarchy makes it hard. I have different experiments that have clearer designs (including a much cleaner ofParameter.h, which is a hairy file in itself, and difficult to split), but nothing that can slide under the current designed unnoticed, not because of "user parameter" considerations but how it ties into ofEvents). there is room for a non-OFsystem-intertwined parameter-value type). anyhow the problem was the trait checked for the existence of i also found a small return value bug, and this closes #8332 too, by prioritizing actual value assignment over silently creating an ofParameter wrapper that gets immediately thrown away. |
Thanks @artificiel! |
Thanks @artificiel @eduardfrigola !! |
Thanks everyone! Closing resolved issues by this. |
* commit '5630d2034d835e81225a225355e97f4144b21179': (446 commits) Restore target build dir behavior for Xcode. Closes #8321 (#8340) of script updates (#8339) _OBJC_CLASS_$_AVFoundationVideoPlayer fix (#8337) poco mk (#8336) relative locations rabbit (#8335) fix(ofParameter): better default init() handling of non-comparable/non-copyable objects and containers (#8325) path to string conversion on Windows fix. (#8333) iOS template add ofxiOS group ref (#8330) Xcode iOS Target Project Fixes (#8328) chore(iOS): remove iosNativeARCExample (#8324) ofxGui fix for apple targets (#8320) assimp ios addon_config (#8319) chore(iOS): remove GLKit example (#8317) fix(iOS): adjustments to layout of Location example + deprecations updates (#8311) fix(iOS): update to CoreLocation authorization request (#8309) remove boost from android. (#8307) Remove boost from linux scripts, download_libs (#8306) ofPixels memory allocation size fix (#8226) remove boost references from CoreOF.xcconfig and config.*.default.mk for macOS and osx. (#8304) Fix to json scripts (#8301) ... # Conflicts: # .gitignore # libs/openFrameworks/gl/ofGLProgrammableRenderer.cpp # libs/openFrameworks/gl/ofGLUtils.h # libs/openFrameworks/gl/ofShader.cpp # libs/openFrameworks/gl/ofTexture.h # libs/openFrameworks/graphics/ofTrueTypeFont.cpp # libs/openFrameworks/graphics/ofTrueTypeFont.h # libs/openFrameworks/sound/ofAVEngineSoundPlayer.h # libs/openFrameworks/sound/ofSoundBaseTypes.cpp # libs/openFrameworks/sound/ofSoundBaseTypes.h # libs/openFrameworks/sound/ofSoundStream.cpp # libs/openFrameworks/utils/ofConstants.h # libs/openFrameworks/utils/ofThread.h # libs/openFrameworks/utils/ofURLFileLoader.cpp # libs/openFrameworks/utils/ofUtils.h # libs/openFrameworks/utils/ofXml.h # libs/openFrameworksCompiled/project/android/build.gradle # libs/openFrameworksCompiled/project/android/common-functions.gradle
No description provided.