You could use 'configure' to determine what is available and then offer the appropriate options. As a long time Unix user, the standard experience I would expect from an application is to be offered a default choice and then given the opportunity to enter the full path to an alternate choice.
Julie On Thu, Apr 21, 2011 at 6:58 PM, marbux <mar...@gmail.com> wrote: > On Thu, Apr 21, 2011 at 4:05 PM, larry price <lapr...@gmail.com> wrote: > >> Here's a nice intro to gnome-open which is what you would want to use on >> ubuntu >> http://embraceubuntu.com/2006/12/16/gnome-open-open-anything-from-the-command-line/ >> >> in OS X you would use open >> > > Not quite what I was hoping for since it apparently offers no choice > dialog. By way of further background, I'm working with Lua embedded in > an outliner, NoteCase Pro, which has builds for about 55 different > platforms. The app includes APIs for scripting the export of documents > and an API that returns the path of the document last exported to. The > latter API makes it feasible to script actions upon the exported file > post-export. > > I'm hoping for a method that would allow the user to choose the > program to open the exported file in. E.g., if export type is HTML, > enable the user to choose between opening it in their choice among > different browsers or their choice of a plain text editor or other > HTML editor. All without knowing in advance what the choice would be, > paths to executables, etc. > > The Windows command line in my first post handles the situation > nicely. That leaves only 53 or so supported platforms to go. :-) > > I'm thinking at the moment that the way forward might be to modify the > outliner so that the user can map the apps to use with various export > file types and create an API that returns the desired mapping. > > It's a bit touchy because the HTML is exported with UTF-8 set as the > character encoding, so editing the HTML with a text editor that > doesn't properly support UTF-8 is problematic. Going the mapping > route, we could pop up a warning while the user is seting the mapping > that the text editor must be set to support UTF-8 encoding. That's > something we can't do with the Windows dialog. > > So this might be even better. > > Thanks for the assist. > > Best regards, > > Paul > _______________________________________________ > EUGLUG mailing list > euglug@euglug.org > http://www.euglug.org/mailman/listinfo/euglug > _______________________________________________ EUGLUG mailing list euglug@euglug.org http://www.euglug.org/mailman/listinfo/euglug