Sunday, 29. June 2008, 05:16:38
workstation, vmware
Note to self for future reference:
- Uninstall VMware Workstation, leave license details in registry.
- Export registry key HKLM\SOFTWARE\VMware, Inc..
- Take exported .reg file to new computer and double-click to add to the registry.
- Install Workstation.
Saturday, 21. June 2008, 03:27:53
extensions, opera, files, management
...
For Opera 9.50, the cache management was changed so that the stored files had no extensions. While I've lost track of the precise reasons (an Opera employee made a statement early on in the beta tests), I have to conclude that it was done for a very good reasons and won't be changed.
Dare I point out that Firefox does the exact same thing? Or that Safari doesn't even make the individual files available AT ALL? Safari puts everything inside a single database file!
For three independent browser developers to arrive at the same solution, indicates to me there is a common problem, and that none of them will be reverting to their previous behavior.
Given that, what can be done to improve your cache-diving expeditions? Opera makes it really quite simple:
- Go to Tools -> Advanced -> Cache (shortcut: opera:cache ).
- Open the Links panel.
- Optionally expand the panel to the full page.
- Use the Quick Find field to search for file extensions, eg ".gif".
- Use standard list selection techniques (Shift/Ctrl+click for multiple selections).
- Right-click and "Save Linked Content As..." or "Save to Download Folder" (your Download Folder is specified under Tools -> Preferences -> Advanced -> Downloads).
What would also be nice, and doesn't seem like a lot of work on Opera's part, would be to enhance the cache display page a bit. Two new columns to show the MIME type and download date/time would be very useful. Furthermore, since it's web-based, and that there are many drop-in solutions for sortable tables on the web, sorting the table by clicking the headings sounds like an almost trivial enhancement.
Wednesday, 18. June 2008, 16:31:09
web, javascript, compatibility, opera
What is it with Javascript programmers these days? Doesn't anybody know how to program?
I was investigating why tinyMCE 2 (.1.3) is failing in Opera in some circumstances, and what did I find?
Exhibit 1:
if (tos.getEditorTemplate) editorTemplate = tos.getEditorTemplate(this.settings, this.editorId);
deltaWidth = editorTemplate.delta_width ? editorTemplate.delta_width: 0;
The if statement is there for a reason - to initialize editorTemplate to something useful - but what happens if the statement is false? editorTemplate does not get initialized. Look at the following statement - the potentially uninitialized editorTemplate is used! That would generate an error in any browser.
Exhibit 2:
getRng: function() {
var s = this.getSel();
if (s == null) return null;
if (tinyMCE.isRealIE) return s.createRange();
if (tinyMCE.isSafari && !s.getRangeAt) return '' + window.getSelection();
if (s.rangeCount > 0) return s.getRangeAt(0);
return null
},
isCollapsed: function() {
var r = this.getRng();
if (r.item) return false;
return r.boundingWidth == 0 || this.getSel().isCollapsed
},getRng is obviously capable of returning null. The very next function, isCollapsed, calls it and immediately uses the returned value without checking for null. That will generate an error in any browser.
It doesn't matter how other browsers somehow manage to avoid these obvious bugs - this is just plain crappy coding.
The worst thing is, this is typical of the sort of code that makes the web go. It's a wonder it works at all.