« Just Enough Governance – It’s Not Just a Notes Thing | Main| Notes' Old Threat – Resourcing »

Be careful what you search for!

I was working with one of our customers, and I can tell this story because he was working on a third party application that someone else wrote. Do you know the JavaScript function navigator.appName? It is used to tell what type of browser is accessing your application. In Notes/Domino 7, this function was changed so that it now returns "IBM Lotus Notes" instead of just "Lotus Notes". So any application that tests for a Notes client needs to change to look for this new string. This person was trying to reduce the number of 'false' search results and was looking for the strings.

navigator.appName == "Lotus Notes"

and

navigator.appName <> "Lotus Notes"

Well, it turned out that this approach missed code like this:

variable = "Lotus Notes"
:
:
navigator.appName == variable


and several other instances, including one in the original code that was mis-typed as "LotusNotes" (no space) which never worked in the first place! The moral of the story is, you can be too smart for your own good. In this case, it is best to just find every occurrence of navigator.appName and look at it in context. Or, you could search for navigator.appName AND "Lotus Notes" and hope that the variable is not passed as a parameter, making it defined in a different sub or function from where it is used. But whatever you do, you need to look in every design element to make sure you find all occurrences because we can hide code in a lot of different places.

Category

Post A Comment

Feeds

Custom Button Custom Button

Category Cloud

Disclaimer

The views expressed by the authors on this blog do not necessarily reflect the views of Teamstudio, those who link to this blog, or even the author’s mother, father, sister, brother, uncle, aunt, grandparents, cousins, step relations, any other blood relative - and sometimes not even the author himself or herself.

Comments on this website are the sole responsibility of their writers and it is assumed those writers will take full responsibility, liability, and blame for any libel or litigation that results from something written in, or as a direct result of something written in, a comment. The accuracy, completeness, veracity, honesty, exactitude, factuality and politeness of comments are not guaranteed. Oh, how they are SO not guaranteed.
en-us,en;q=0.5OFFCCBot/1.0 (+http://www.commoncrawl.org/bot.html)38.107.179.211www.getthemostfromnotes.comHTTP/1.180Lotus-Domino/tsblog.nsf/D6Plinks/TBAN-7J4PUR-Tips-and-Tricks