Myriad Helpers

First of all, thanks to Shane (again) for the Myriad Helpers! I was looking for a way to add the open panel and you made it simple!

One observation, I’m getting an error in the console: Myriad Helpers(24395,0x7fff7830c960) malloc: reference count underflow for 0x400d89b60, break on auto_refcount_underflow_error to debug.

I click “show open panel as sheet” and then click around. Ironically, after beginning to post this, now I’m unable to reproduce the error in the Myriad Helpers app. I was able to reproduce it one more time after changing “multiples” to true, but to appear to be “random” in the MH app, whereas in my app, it happens consistantly. (i am using the folder example rather than files)

The panel works properly, so it’s not a big deal, but thought I’d see if there were any suggestions. I’ve got no idea how to set the “break on auto_refcount…” so I thought I’d leave it to an expert :slight_smile: I’d just like my app to not throw errors :slight_smile:

I’ll also be honest, since it’s been difficult to reproduce in the MHapp, it could be something I’ve done in my own app, but as it did happen more than once in MHapp, I figure its worth asking.

That error means you’re hitting a bug to do with garbage collection in one of the Cocoa frameworks. The bad news is there’s nothing you can do about it; the good news is that doesn’t matter.

Thanks for the reassurance that its not an issue. I didn’t think so, since it worked, but thought I’d ask.

Another question related to the same helper. I’d like for the “open sheet” to close before the end of “openSheetDone_” and I’m not finding a way to do so. I have the user select a folder and then want to process the folder while displaying a different panel with a progress bar (i had the progress bar working when not using the sheet, but love the sheet - just want it to close after it gives the delegate its result)

That’s not possible. What you can do instead is put what you want to be done in another handler, and call it from within openSheetDone_ using performSelector_withObject_afterDelay_.

My original thought was it needed to be in another handler, and thought I had searched everything on how to “ignore” or “skip” or “not wait”…didn’t occur to me to use “delay” :slight_smile:

Works perfectly - thanks again!!!