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

stopReplying is possibly not as selective as it needs to be #162

Open
jamesplease opened this issue Oct 27, 2014 · 8 comments
Open

stopReplying is possibly not as selective as it needs to be #162

jamesplease opened this issue Oct 27, 2014 · 8 comments
Labels

Comments

@jamesplease
Copy link
Member

The possible culprit

Q: do stopComplying and stopReplying work as intended right now? Or do they remove too much?

@jamesplease jamesplease added this to the v0.8.2 milestone Oct 27, 2014
@jamesplease jamesplease changed the title stopComplying and stopReplying aren't as selective as they need to be stopComplying and stopReplying are possibly not as selective as they need to be Oct 27, 2014
@jamesplease jamesplease added question and removed bug labels Oct 27, 2014
@jamiebuilds
Copy link
Member

Any word on this?

@jamesplease
Copy link
Member Author

If there was there would be more here!

@jamiebuilds
Copy link
Member

I don't need ya sass, I thought you had something locally before?

@ianmstew
Copy link
Member

Are you considering allowing a complyOnce/replyOnce handler to be nondestructive of permanent handlers? E.g., a complyOnce handler would be added in addition to or temporarily in place of an existing handler?

@jamesplease
Copy link
Member Author

Are you considering allowing a complyOnce/replyOnce handler to be nondestructive of permanent handlers?

Not quite. The problem is that, given some arguments, stopComplying might remove too many handlers. I need to test all of the permutations.

@jamesplease jamesplease removed this from the v0.8.2 milestone Jan 3, 2015
@jamesplease
Copy link
Member Author

Todo:

Add tests for each combination of possible arguments. By my count, there are 8 combinations

a, b, c
undefined, undefined, undefined

a, b, undefined
a, undefined, c
undefined, b, c

a, undefined, undefined
undefined, b, undefined
undefined, undefined, c

@jamiebuilds
Copy link
Member

You should write a single test in a loop that goes through each of those since it's difficult to track all of the variations.

@paulfalgout
Copy link
Member

So one related issue:

callbacks may be wrapped via the makeCallback function, so if your callback needs to be wrapped, you will not be able to call stopReplying as it won't have the wrapped callback for comparison.

https://github.com/marionettejs/backbone.radio/blob/master/src/backbone.radio.js#L331

@jamesplease jamesplease changed the title stopComplying and stopReplying are possibly not as selective as they need to be stopReplying is possibly not as selective as it needs to be Jun 21, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants