Aug 16 2009

Burning DVD ISO Images Fails In Ubuntu 9.04

I upgraded to Ubuntu 9.04 Jaunty Jackalope 64 from Ubuntu 8.04 Hardy Heron 64 the other day with the hopes that some of my issues with the operating system and desktop experience would be resolved. While a lot of my problems seemed to be improved if not fixed, the Ubuntu 9.04 upgrade did introduce one big problem that is a deal breaker. I can no longer burn dvd images. I can still burn CD data discs and I didn’t try and CD ISO’s because I didn’t want to waste the discs.

K3b gives me this error :


:-[ WRITE@LBA=0h failed with SK=3h/ASC=0Ch/ACQ=80h]: Input/output error
:-( write failed: Input/output error

And Brasero gave me this error :

BraseroWodim process finished with status 254
BraseroWodim called brasero_job_error
BraseroWodim finished with an error
BraseroWodim asked to stop because of an error
  error    = 0
  message  = "no message"
BraseroWodim stopping
BraseroWodim got killed
Session error : unknown (brasero_burn_record burn.c:2602)

Apparently other people are having the same issue. After a bit of searching I gave up on finding a fix or workaround for either K3b or Brasero. I even tried installing the Nero Linux Trial for 64 bit but I got some ambiguous write error.

I ended up taking my burner out of my ubuntu machine and putting it in an old windows box. The first dvd that I’m burning is a windows 7 install disc. After using ubuntu for about 6 months as my primary desktop operating system I think I’m done.

Share

Jul 28 2009

JavaScript innerText and textContent

I was having an issue with the javascript innerText property today. I was to lazy to convert the legacy code that I was working on to use proper DOM so I did some reading on the issue.

Turns out that FireFox doesn’t use innerText at all. Apparently the proper DOM property to use is textContent. textContent does basically the same thing as innerText.

A not so pretty solution to this issue is to check at the start of the script whether the browser supports innerText or textContent. I found a few resources that allowed me to copy and paste a few lines to make everything work.

This one which I found on coderlab is a little bulky but it gets the job done. It checks which property is available and then forces the programmer to check that flag every time he wants to use the property.


var hasInnerText =
(document.getElementsByTagName("body")[0].innerText\
 != undefined) ? true : false;
var elem = document.getElementById('id');
if(!hasInnerText){
    elem.textContent = value;
} else{
    elem.innerText = value;
}

This is the method I actually used. I just or’d the two different properties together and it seemed to work. I guess one will always be undefined.


var message = elem.innerText || elem.textContent || "";

At least FireFox is following the standards unlike Internet Explorer which always needs special css and javascript. Making everything work in Internet Explorer always adds hours onto development time…

Share