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
Event Trigger support #1784
Event Trigger support #1784
Conversation
prevents multiple calls to enableTrigger:/disableTrigger:
enableTrigger: and disableTrigger: return a BOOL. We should take the value of activate from that, instead of assuming the method always succeeds.
Calling setEnabled: has side-effects: * sends a notification * causes Triggers.plist to be written to disk * calls enableTrigger: or disableTrigger: Only the last of these side-effects is desirable, and only when the trigger is enabled. (Calling disableTrigger: at launch, when it’s sure to be disabled already, can be bad.) So instead of relying on side-effects here, explicitly call the desired behavior.
There are apparently all kinds of side-effects that will cause triggers to get disabled multiple times. I’ve fixed most of them, but there are two more things I’m looking at in
|
I’ve added the I’m giving up on the other issues for now. We’ve got KVO stuff causing triggers to be “updated” all over the place. Instead, I just made the event trigger providers handle multiple disable messages gracefully. |
Mostly seems fine. I'm sure there's more to be done, and yes, the 'saving everytime anything is changed' bug is annoying :D |
So… merge? |
Scratch that. I think it is required because we moved the |
OK, so is this really required? I thought you said RE the event trigger plugin that you'd just manually copy/paste the protocol into the plugin before building so that it worked with QS 1.1? |
Oh, true. Been a while, sorry. |
setEnabled:
calls[[QSTriggerCenter sharedInstance] triggerChanged:self]
, which callssetEnabledDoNotNotify:
, which contains the line I removed from here.While working on Event Triggers some more, I saw some things being overreleased because
disableTrigger:
was getting called twice.