-
Notifications
You must be signed in to change notification settings - Fork 1
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
File Type association, Register CogTool as a Viewer and Editor of .cgt files #20
Comments
Interestingly. CogTool has had this issue for a while per a user request back in 2006 found in the original documentation. |
The feature branch feature/file-association-from-master has CogTool opening on the double-click of a CGT file, but it does not actually open the file once CogTool is launched. This is progress. Being a SWT application I'm at present unfamiliar with how to move this forward. |
@justingeeslin has funded $20.00 to this issue.
|
No expert here (and no macintosh to test changes), but your bounty got me looking into this :-) Interesting tool. Line 113 in b9060c7
The app template essentially does register the shell script cogtoolstart as a new application. When running the application this cogtoolstart shell script then executes CogTool.jar inside a JVM. Based on the assumption that, when double-clicking any file on MacOS, MacOS passes the filename (and path?) Unfortunately, I have no way of testing the result.
Maybe you could test the changes in the pull request and let me know if this resolves your issue? |
Thanks so much for taking on this issue! I've tested the code from PR #68 and can confirm that CogTool does open, but does not open the file. But I think we're getting closer. I've added some logging in CogTool.java as you suggested. In my testing, line 272 and onwards looks like the following. OptionParser parser = new OptionParser("f:i:re:s:qQ");
// The psn is supplied on MacOS when a GUI application is double-clicked;
// we just ignore it, but need to recognize it so we can ignore it.
parser.accepts("psn", "process serial number (ignored)").withRequiredArg();
MessageBox box = new MessageBox(WindowUtil.GLOBAL_DISPLAY.getActiveShell(), SWT.CANCEL | SWT.OK);
box.setText("DEBUG");
box.setMessage("args: " + Arrays.toString(args));
box.open();
OptionSet opts = parser.parse(args); The message box comes back with an empty array. |
The CogTool.app does not register any associated file types.
Would be more convenient to have CogTool open when opening a .cgt file instead of the user receiving a prompt like the one below.
IssueHunt Summary
Backers (Total: $20.00)
Submitted pull Requests
Become a backer now!
Or submit a pull request to get the deposits!
Tips
The text was updated successfully, but these errors were encountered: