Fruck!

Why couldn’t Lotus Notes throw an error if you try and set the value of a read-only property?

I made a boneheaded move this week. I was working with an encrypted password field (among other changes) in LotusScript and I thought I would set the value with the value below.

passItem.text = strNewPassword

It compiled. I ran the code and I probably should have used better test data (changing a password from “test1113″ to “test111111″) because I missed the fact that the password didn’t change.

It turns out (and I knew this…) notesitem.text is a read-only property. You can only replace the value with a notesitem.replaceitemvalue call. I’m cool with that… but I could have used a thrown error to warn me to change my code before we moved into production.

My only saving grace is that the user also missed the problem with her testing.

23 May 2008 | lotus | Comments

Comments:

  1.  
  2.  
  3.