Tuesday, July 15, 2014

Notepad++ Missing Context-menu

For some reason the right-click menu item "Edit with Notepad++" has gone missing on several computers. The following from stack overflow worked for me.

- uninstall Notpad++
- Download and install "Microsoft Visual C++ 2008 Service Pack 1"
- Re-install Notepad++

Friday, July 11, 2014

console.log throws error on Internet Explorer IE

console.log is a great debugging tool. It is better than alerts.  Older versions of IE will give you a
'console' is undefined
Error if you try to use it. I put the following at the top of a javascript file that is included in my web app and it kept IE from throwing script errors.
//If we are on IE8 or similar console won't be defined
if (typeof console === 'undefined') { ////do an alert in IE. You could make it write to another window if that worked better
//console = { log: function () { alert(arguments[0]); } };
//just swallow the call in IE
console = { log: function () { } };
I crafted this solution from this page.