Two Dojo JavaScript Gotchas that got me

November 19th, 2010 by rvdavid 3 comments »

I was just about ready to tear my own head off when I’ve finished unit testing my Service and Model classes and had damn near close to 100% code coverage, and ran into some really fiddly issues with dojo. I’m doing this retrospectively, so off the top of my head these are the two issues that had me scratching my head due to their obscurity.

First issue: got a ”dojo.data.ItemFileWriteStore” is not a constructor” message.

I use ItemFileWriteStore as my data store for a combo box intended to list fields in a search. Users could then have the ability to filter through the list by typing a letter in the combobox and auto complete suggestions will be displayed in a list below ala a select list. Problem is when I was running it, I get this error message.

I decided to verify that nothing’s wrong with the way I built the dojo JS library. Then headed to google. First few results were garbage, then came an exact match. It was one of two cases:

  1. dojo.require() is missing
  2. The constructor statement occurs before dojo has completed loading.

» Read more: Two Dojo JavaScript Gotchas that got me

New Category: Live Coding Notes

November 19th, 2010 by rvdavid 2 comments »

Ok, I know, I’ve been slack.. It’s been several months since my last post and that last one was a tip on how to fix gnome keyring. Now based on how I’ve been on twitter and lack of activity on this blog, I guess you could say that I’ve not been doing anything at all or doing too much.

Well, it’s a mixture of both really, I really, _really_ want to make a post, but then become too busy. Once I’ve finished what I was doing (after several days), I just want to not do anything.

Anyway, those days are no more, I’m creating a new category called “Live coding notes” and it will be notes that I’ve made (I have tons of them on my desk and on gnote) regarding several things I’ve had to do, things I got stuck on, had to mess around with while coding and how I resolve or change my solution.

» Read more: New Category: Live Coding Notes

Fixing Gnome keyring / Login Keyring: “Enter Password to Unlock” issue

September 1st, 2010 by rvdavid 1 comment »

Hi everyone, this is just a quick how-to on handling the Ubuntu Maverick/Gnome Login Keyring issue which occurs when you change your user password.

The issue: You’ve decided to change your password for whatever reason and suddenly you’re presented with the following message whenever you launch an application you have instructed to “remember” your password.

Enter password to unlock your login keyring
The password you use to log in to your computer no longer matches that of your login keyring.

This is how you fix it:
» Read more: Fixing Gnome keyring / Login Keyring: “Enter Password to Unlock” issue

Setting TTY / Virtual Consoles resolution with Grub 2 in Ubuntu Lucid Lynx

June 23rd, 2010 by rvdavid 4 comments »

I’ve been using Ubuntu for a while now and something that bugged me a lot was the crappy screen resolution whenever I had to go and use my virtual terminals (TTY).

In previous versions of ubuntu which used grub 1, setting up the resolution for tty was done by simply using the vga=??? boot option. In grub 2 however, this is not so easy.

I remember when it first came out. I was somewhat exasperated by the fact that I had _just_ become comfortable f*cking with grub’s menu.lst and now I had to learn how to use grub 2 – which had some new convention for editing menu items let alone setting up the resolution.

Anyway, there’s really nothing to it. I had to do a lot of digging around and some experimentation, but in the end, as with all things linux it was “easy” when I finally found out how. » Read more: Setting TTY / Virtual Consoles resolution with Grub 2 in Ubuntu Lucid Lynx

Just when I needed it the most, my weapon of rapid web development goes nuts!

June 18th, 2010 by rvdavid 3 comments »

Today was an absolute sh*t fight. Starting from an entire morning where after I experienced several crashes with Visual Studio Express, that I thought I’d try the full version.

To do this though, I had to expand my VMWare virtual disk. So a quick:

vmware-vdiskmanager -x 45GB windevxp.vmdk

… and my virtual disk is now 45GBs! – I then had to resize the windows partition. I’ll post more on this straight after this post.

So with that done, I’m set to install Visual Studio, I thought yeah it should take about 5 – 10 miuntes…

BOY WAS I WRONG!

The installation took like 2 – 3 hours at least, so there’s a large chunk of my day gone. (Great… F*CK!) At this point though, I didn’t care anymore, I was bitter about the amount of work I’ve lost and the disruption caused by stupid Visual Studio Express randomly crashing! I just wanted the whole thing to be installed and start coding again.

» Read more: Just when I needed it the most, my weapon of rapid web development goes nuts!