openframeworks / openframeworks/openFrameworks
ofParameter<void> notification loop
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 10.4k
- Forks
- 2.6k
- Avg merge
- 1d 21h
- Merged PRs (30d)
- 9
Description
Hello everyone.
I'm in a situation where I create ofParameters with .:newReference() function.
With that I have both ofParameters "linked together" similar to @arturoc ofParameterLink proposal
I have no issues with that except with ofParameter, as there is no notification loop safeguard.
I've resolved this issue updating what I did in this change with the notifiy loop safeguard implemented in : https://github.com/openframeworks/openFrameworks/blob/b674f7ec1f41d8f0fcfea86e3d3d3df3e9bdcf36/libs/openFrameworks/types/ofParameter.h#L726-L766
See implementation in: https://github.com/PlaymodesStudio/openFrameworks/commit/7bbf058eb2afe5852fd7c04b8ceed0831a4fe719
My doubt is about using this approach, or using the setMethod / eventsSetValue / noEventsSetValue. Seems as a more elegant solution but, as ofParameter has no value, its use is only for triggering events noEventsSetValue is not a needed function.
What do you think about that?
Thanks!
Eduard
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with libs/openFrameworks/types/ofParameter.h at the referenced notification-loop implementation, then compare the linked openFrameworks pull request and PlaymodesStudio commit. Review how ofParameter uses setMethod, eventsSetValue, and noEventsSetValue. Done requires an agreed approach for preventing loops in linked ofParameter instances and a corresponding implementation or documented decision.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- backend-api-design
- Issue type
- Bug
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100