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

Allow the addReplace action to replace existing nodes while keeping the ... #1130

Merged
merged 2 commits into from
Jun 14, 2014

Conversation

scztt
Copy link
Contributor

@scztt scztt commented Jun 13, 2014

...same node id.

This allows transparent swapping of a synth (e.g. updating synthdefs with a new version) while ensuring all references to the node remain valid. Allow this on Groups for consistancy, though it's functionally identical to freeing all of the Group's children.

…he same node id.

This allows transparent swapping of a synth (e.g. updating synthdefs with a new version) while ensuring all references to the node remain valid. Allow this on Groups for consistancy, though it's functionally identical to freeing all of the Group's children.
@@ -833,6 +833,8 @@ SCErr meth_s_new(World *inWorld, int inSize, char *inData, ReplyAddress* /*inRep
case 4 : {
Node *replaceThisNode = Msg_GetNode(inWorld, msg);
if (!replaceThisNode) return kSCErr_NodeNotFound;
Node_RemoveID(replaceThisNode);

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

please follow the coding style of the code of the file you are in. don't mix tabs and spaces. might sound picky, but helps the readability of the code!

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Re white space: I think it might be time to standardise on one style. Whitespace inconsistencies are a very common issue with submitted patches, but derive to a large extent from the fact that massive numbers of files were added that did not follow the original conventions.

I know even mentioning tabs vs. spaces risks starting a holy war, but honestly we should just clean this up.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tim - fixing, thx.

muellmusik - you're right. It creates problems like this.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

tim - fixing, thx.

muellmusik - you're right. It creates problems like this. And it's annoying.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Even worse, changing it at this late date would mess up things like git blame, as many lines would be attributed to whomever made the trivial whitespace changes. (This is already true of any whitespace fix commits.) Maybe some git genius knows a way around this…

But it's probably worth it IAC though just to help avoid further inconsistency.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Git blame can be told to ignore whitespace. Though... I think neither
github nor most gui clients support this, which is where it's most likely
to be used.

  • S

On Fri, Jun 13, 2014 at 1:59 PM, muellmusik notifications@github.com
wrote:

In server/scsynth/SC_MiscCmds.cpp:

@@ -833,6 +833,8 @@ SCErr meth_s_new(World inWorld, int inSize, char *inData, ReplyAddress /*inRep
case 4 : {
Node *replaceThisNode = Msg_GetNode(inWorld, msg);
if (!replaceThisNode) return kSCErr_NodeNotFound;

  •  Node_RemoveID(replaceThisNode);
    

Even worse, changing it at this late date would mess up things like git
blame, as many lines would be attributed to whomever made the trivial
whitespace changes. (This is already true of any whitespace fix commits.)
Maybe some git genius knows a way around this…

But it's probably worth it IAC though just to help avoid further
inconsistency.


Reply to this email directly or view it on GitHub
https://github.com/supercollider/supercollider/pull/1130/files#r13771399
.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's better though. People could cl if needed.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@timblechmann
Copy link
Contributor

apart from the coding style this patch looks good to me. supernova has the same behaviour by the way.

telephon added a commit that referenced this pull request Jun 14, 2014
server: addReplace: replace existing nodes while keeping the same node id.
@telephon telephon merged commit f6455d7 into supercollider:master Jun 14, 2014
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

Successfully merging this pull request may close these issues.

4 participants