Be careful what you search for!
Bookmark :
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.
