Hi Adam, Thanks for the comments.
On 2009-01-15 01:31, "Maxwell, Adam R" <[email protected]> wrote: >>> If there's a way to do this with a script hook, that would be preferable; >>> otherwise, I think a real plugin might be a better approach from a security >>> standpoint... >> >> Hmm, perhaps you could spell out the security concerns a bit more here, >> because I haven't thought about it too much. Is there a big difference >> between a script hook and providing a hidden preference for a shell script >> that is not set in the BD distribution? Ie it's up to the end user to >> download/write their own shell script at their own risk. > > My concern is mainly that it's a hidden preference for a shell script that > runs at times the user may not expect (only when a file is dropped on the I supposed I was thnking that it wouldn't be enabled unless the user did something. > main window?). Script hooks are clearly labeled, and the user has a UI to > see what's enabled and when it will fire. I have developed a severe OK, I guess it would be possible to do this instead. > distaste for hidden preferences, since they generally imply special cases > and/or untested code paths, and are generally a nuisance. Worse, if users > come to rely on them, you can't remove them without someone telling you the > app is now useless. > There are also some issues with tasks and pipes; NSTask should generally be > used in an exception handler, and you need to make sure there are no Yes, I figured that out with some testing! But ... > problems with filling the pipe (and then blocking indefinitely). > BDSKShellTask handles all of this, and also disables SIGPIPE, but running an Yes I hadn't found BDSKShellTask and it should use that at least avoid redundancy. > external task does have the potential to hang or crash the calling > application. Is there much risk when all exceptions are handled? > Yeah, it's the user's fault, but minimizing the risk to data > is important. Overall, if script hooks didn't have to call applescript (and I guess the applescript can chain a shell command) or if there were to do what Mike was suggesting - little python scripts as plugins - I would be v happy. More generally, I think having a plugin mechanism is good because it encourages interaction with engaged & more satisfied users ie good for the long term viability of the app. Plus there is a pretty clear separation of responsibility. Best, Greg. ------------------------------------------------------------------------------ This SF.net email is sponsored by: SourcForge Community SourceForge wants to tell your story. http://p.sf.net/sfu/sf-spreadtheword _______________________________________________ Bibdesk-develop mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/bibdesk-develop
