On 15 Jan 2009, at 9:48 AM, Gregory Jefferis wrote: > 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.
And then forgets that he did... You've no idea how often that happens, and it adds an enormous amount of email slack to figure it out when a bug occurs. The point is that there's no UI where the user can see what's turned on and what isn't. > >> 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. I just added the extra support to the import command that would make this possible to handle with the Import Publications script hook, as I described in a previous email. At an appropriate time I can add a skeleton script hook (everything except for the file->DOI routine) as a sample to the Wiki. Christiaan > >> 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. > I wish Apple had a way to handle generic scripts, not just applescripts. Unfortunately OSA and related stuff is a mess nobody wants to touch. > 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. I also think some kind of plugin mechanism can be good. But it must be well designed, not just added incongruously. Christiaan ------------------------------------------------------------------------------ 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
