Path: csiph.com!usenet.pasdenom.info!aioe.org!.POSTED!not-for-mail From: Swifty Newsgroups: comp.lang.javascript Subject: Re: Two-line Buttons Date: Sun, 29 Apr 2012 08:06:55 +0100 Organization: Aioe.org NNTP Server Lines: 39 Message-ID: <7cppp7ppp803sau73g8aqa8psq03u12q48@4ax.com> References: NNTP-Posting-Host: pk5mh/HhasXKqrxm0wjKDQ.user.speranza.aioe.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Complaints-To: abuse@aioe.org X-Notice: Filtered by postfilter v. 0.8.2 X-Newsreader: Forte Agent 6.00/32.1186 Xref: csiph.com comp.lang.javascript:13685 On Sun, 29 Apr 2012 03:17:27 +0100, "Richard Cornford" wrote: >Almost all desktop web browsers have some mechanism for reporting errors >in javascript, and those mechanisms will report syntax errors (along >with runtime errors). You should become familiar with those error >reporting mechanisms and use them when doing any work with javascript; >they proved useful clues as to what you are doing wrong when things >don't work (as expected, or at all). The OP would find themselves in the perplexing situation that their code worked when it generated error messages, but not when the code was changed to eliminate the messages. I've had this happen to me on several occasions and it can be very frustrating. Especially when (like me) you are not entirely sure what you are doing. I've even had a hardware version of this conundrum. On a very early IT system (c. 1970) a rubber "O" seal fell off a removable disk, and lodged in the drive's SEEK servo. When the drive was first used, the rubber ring caused friction and I/O errors (the SEEK timed out). However, if you drove the disk hard enough, the rubber heated up, and became less sticky. Smoke would come out of the drive, but you got no I/O errors when it was smoking. :-) Before we found the fix, I wrote a program to bypass the problem. It did maximum possible seeks for a minute or so, which would get the drive smoking nicely. I called the program "smoker" and was always amused to hear the operators calling for "smoker" to be run. "Smoker" helped the engineer to fix the problem. We demonstrated the problem, then my "fix", and whilst the drive was still smoking, he removed the covers, and the origin of the smoke was obvious. Debugging in a bygone era... -- Steve Swift http://www.swiftys.org.uk/swifty.html http://www.ringers.org.uk