Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

'browse' in [pdcontrol] is not only for 'browsing' as you can open any file. #862

Open
porres opened this issue Jan 9, 2020 · 4 comments
Open

Comments

@porres
Copy link
Contributor

@porres porres commented Jan 9, 2020

'browse' in [pdcontrol] lets you open any file in your computer with the default software. If you give it a link, it only opens that as a file in your default browser software.

The name method and help file indicates it can only open links, but it's more powerful than that.

I'd suggest change that method name to 'open' and say you can open anything in the documentation with an example of opening a Pd patch.

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Jan 9, 2020

alternatively, don't document it, and handle the current behavior as an implementation detail that can change anytime.

the actual implementation of the underlying tcl-proc is pretty clear that it is about:

open[ing] HTML docs from the menu using the OS-default HTML viewer

the notion of opening a (HTML) file with some default application is not very consistent across platforms, and as a result the tcl-proc falls back to explicitely listed web-browsers, including netscape and text-based lynx.
i don't think that you do your users a favour if you open random files (e.g. .pd patches) with a web-browser.

so adding documentation that you can open some random filetype via [pdcontrol] is likely to generate a follow-up bugreport that you actually cannot open some random filetypes.

@jmmmp

This comment has been minimized.

Copy link

@jmmmp jmmmp commented Jan 10, 2020

Is there something in the tcl-proc which says that it only works with html files? If the documentation is changed to

open[ing] files from the menu using the OS-default software for that file type

then the function is defined in more general terms (which are true), and the responsability to have the adequate software falls on the user - e.g. if a user doesn't have a html viewer installed, 'browse' as it is now will be useless and no bug report will help, because the issue is not for Pd to solve.

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Jan 10, 2020

as i said above:

the notion of opening a file with some default application is not very consistent across platforms, and as a result the tcl-proc falls back to explicitely listed web-browsers, including netscape and text-based lynx.

with this i tried to say: not all platforms support "opening files with some default application" (regardless of whether an application capable of handling a given filetype).

because there is no way (for all supported platforms) to ask the OS to open a file, the tcl-proc eventually falls back to explicitely trying to open the file with a web-browser.

this i consider as "something in the tcl-proc which says that it only works with html files" - at least "in the end".

@umlaeute

This comment has been minimized.

Copy link
Contributor

@umlaeute umlaeute commented Jan 10, 2020

and to re-iterate.

@jmmmp says, we should put the following in the documentation:

open[ing] files from the menu using the OS-default software for that file type

whereas i say, that this is not possible (in the general case)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.