Access to ofParameter value by reference

Open
#5,109 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
3/5
Estimated time
1-2 days
Newbie friendliness
45/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Stale
Tech stack
cpp
Domain
api

Research direction

Start by tracing the ofParameter value access and the existing changedE event behavior. Compare the referenced getRef() idea with current access patterns and determine how reference access should behave when events are not being observed. Done means a documented, tested API decision that preserves the existing event semantics.

Written by the indexing model from the issue text.

Description

I'm assuming access is kept private because that would otherwise mess with the changedE events, but it would be really useful for situations where we're not listening for events. The obvious use-case is for GUI systems that use value references directly.

I've already seen a few different "hacks" for dealing with this, so it feels like it's a common request:

I'm thinking something along the lines of:

    ParameterType & getRef() {
        return obj->value;
    }
Dominant language
C++
Stars
10.4k
Forks
2.6k
Avg merge
1d 21h
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openframeworks/openFrameworks

All issues in openframeworks/openFrameworks

Similar issues

More C++ issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.