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

Plugin not unregistering as an observer on dealloc #10

Closed
willco007 opened this issue Jun 17, 2014 · 3 comments
Closed

Plugin not unregistering as an observer on dealloc #10

willco007 opened this issue Jun 17, 2014 · 3 comments

Comments

@willco007
Copy link

If the plugin is disabled it can be dealloc'd which then will cause a crash because it's still a registered observer of the save notification. It needs to unregister in dealloc.

Furthermore, it should be using the callback available in 2.0 and later:

  • (void)textViewWillSave:(CodaTextView*)textView

Instead of sniffing private notifications.

@keegnotrub
Copy link
Owner

Thanks for the feedback @willco007 - I'll look into that dealloc issue when I have some free time, maybe this weekend. As for using (void)textViewWillSave:(CodaTextView*)textView I kind of need the file to be committed to disk before I can run libsass to do the conversion. Do you have any suggestions for getting around that? I think at one point I tried just writing it to disk on that callback but got a crash.

@keegnotrub
Copy link
Owner

@willco007 I believe I've fixed this in this release. Thanks again for reporting this.

@willco007
Copy link
Author

We are talking about adding a did save callback for 2.5 to allow this type of processing on save. Look for it in an upcoming release.

Cheers,
Will

On Jun 18, 2014, at 3:26 PM, Ryan Krug notifications@github.com wrote:

Thanks for the feedback @willco007 - I'll look into that dealloc issue when I have some free time, maybe this weekend. As for using (void)textViewWillSave:(CodaTextView*)textView I kind of need the file to be committed to disk before I can run libsass to do the conversion. Do you have any suggestions for getting around that? I think at one point I tried just writing it to disk on that callback but got a crash.


Reply to this email directly or view it on GitHub.

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