Skip to content
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

Node.add(In|Out)putPin() should handle pre-existing pins of the same name #27

Open
geloescht opened this issue Mar 23, 2015 · 1 comment
Assignees

Comments

@geloescht
Copy link
Contributor

When a patch is loaded from XML, pins are created that are mentioned in links but do not exist on nodes themselves. When pins of the same name are created after the patch is loaded, addInputPin() and addOutputPin() overwrite those pre-existing pins without properly destroying them.
I think addInputPin() and addOutputPin() should handle this case by not creating a new pin. Instead, they should reconfigure the existing pin according to the new pin type and default value and return it.
Code like this already exists in GenericShader (EX9.Effect) and I have written some for the Web Audio nodes, but I really think it should be moved to the mentioned functions in order to avoid code duplication and bugs in the future.

@zauner zauner self-assigned this Mar 23, 2015
@zauner
Copy link
Owner

zauner commented Mar 23, 2015

Good point, I agree.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants