FAQs All Forums All Comments Screencasts
Quick question;
Is there any way that I can access the diff utility (the one used by File > Show Unsaved Changes) from a Javascript macro?
Thanks.. :)
This is the implementation of the "Show Unsaved Changes" command:
// cmd_showUnsavedChanges view = ko.views.manager.currentView; var changes = view.document.getUnsavedChanges(); ko.launch.diff(changes);
You can see more details in Grok: http://grok.openkomodo.com/source/search?q=cmd_showUnsavedChanges&path=%...
Cheers, Todd
Hi Todd, Thanks for your reply.
I actually just meant the utility that "UnsavedChanges" uses.. I would like to use it to get the diff from 2 custom files I will provide..
Ah, I think you mean like the "Tools->Compare Files" feature then right?
ko.fileutils.showDiffs(filename1, filename2);
That the one your after?
Thanks Todd, that's what I was looking for :)
This is the implementation of the "Show Unsaved Changes" command:
view = ko.views.manager.currentView;
var changes = view.document.getUnsavedChanges();
ko.launch.diff(changes);
// cmd_showUnsavedChanges view = ko.views.manager.currentView; var changes = view.document.getUnsavedChanges(); ko.launch.diff(changes);You can see more details in Grok:
http://grok.openkomodo.com/source/search?q=cmd_showUnsavedChanges&path=%...
Cheers,
Todd
Hi Todd, Thanks for your reply.
I actually just meant the utility that "UnsavedChanges" uses.. I would like to use it to get the diff from 2 custom files I will provide..
Ah, I think you mean like the "Tools->Compare Files" feature then right?
That the one your after?
Thanks Todd, that's what I was looking for :)