keegnotrub / coda-sass-plugin

A plug-in for Panic's Coda 2 that converts scss files into css files.
https://github.com/keegnotrub/coda-sass-plugin
82 stars 10 forks source link

Plugin not unregistering as an observer on dealloc #10

Closed willco007 closed 10 years ago

willco007 commented 10 years ago

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:

Instead of sniffing private notifications.

keegnotrub commented 10 years ago

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 commented 10 years ago

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

willco007 commented 10 years ago

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.