Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #23425
| Newsgroups | comp.lang.javascript |
|---|---|
| Date | 2014-03-05 13:30 -0800 |
| References | <02d54e1f-707a-41fa-977b-5fc2566f145c@googlegroups.com> <164343a8-153a-4bb2-9fba-a5e6d8797cba@googlegroups.com> <8fad8921-422d-4be4-b720-462ed219b2d6@googlegroups.com> <58183414-8f8e-4fa9-8524-3077a5430002@googlegroups.com> |
| Message-ID | <16dc4130-84f4-49cc-b4c8-2c509bf18ef7@googlegroups.com> (permalink) |
| Subject | Re: Modular implementation of paintout canvas introduce a myriad bugs |
| From | jonas.thornvall@gmail.com |
Den onsdagen den 5:e mars 2014 kl. 21:48:16 UTC+1 skrev Michael Haufe (TNO): > On Wednesday, March 5, 2014 10:47:10 AM UTC-6, jonas.t...@gmail.com wrote: > > > > > Thanks it worked when i removed the script tag and HTML, but the bug/bugs are hard to spot. > > > > copy and paste the script only. > > > > From jshint on your current code: > > > > 20 warnings > > ----------------------- > > > > 94 Expected a conditional expression and instead saw an assignment. > > 140 Use '===' to compare with '0'. > > 153 Use '===' to compare with '0'. > > 242 Missing semicolon. > > 250 Missing semicolon. > > 258 Missing semicolon. > > 259 Missing semicolon. > > 302 Use '===' to compare with '0'. > > 352 Use '===' to compare with 'true'. > > 353 Use '===' to compare with 'true'. > > 354 Use '===' to compare with 'true'. > > 355 Use '===' to compare with 'true'. > > 356 Use '===' to compare with 'true'. > > 357 Use '===' to compare with 'true'. > > 374 Use '===' to compare with '0'. > > 375 Use '===' to compare with '0'. > > 375 Unnecessary semicolon. > > 384 Use '===' to compare with 'true'. > > 399 Use '!==' to compare with '0'. > > 403 Use '===' to compare with '0'. > > > > 25 undefined variables > > ------------------------ > > 8 adder > > 94 adder > > 172 adder > > 180 adder > > 199 adder > > 206 adder > > 232 adder > > 240 adder > > 257 adder > > 9 refresh > > 174 refresh > > 182 refresh > > 33 numbRange > > 214 numbRange > > 332 numbRange > > 364 numbRange > > 371 numbRange > > 383 numbRange > > 390 numbRange > > 395 numbRange > > 399 numbRange > > 403 numbRange > > 40 n > > 42 n > > 47 n > > 58 n > > 42 upperLimit > > 54 upperLimit > > 78 ctx > > 118 ctx > > 119 ctx > > 121 ctx > > 122 ctx > > 316 ctx > > 342 ctx > > 85 yyled > > 101 yyled > > 103 yyled > > 259 yyled > > 282 yyled > > 283 yyled > > 290 yyled > > 291 yyled > > 338 yyled > > 86 xxled > > 97 xxled > > 99 xxled > > 258 xxled > > 266 xxled > > 267 xxled > > 274 xxled > > 275 xxled > > 337 xxled > > 87 v_inner > > 119 v_inner > > 122 v_inner > > 133 v_inner > > 143 v_inner > > 143 v_inner > > 88 h_inner > > 119 h_inner > > 122 h_inner > > 134 h_inner > > 149 h_inner > > 155 h_inner > > 155 h_inner > > 89 h_outer > > 96 h_outer > > 134 h_outer > > 149 h_outer > > 160 h_outer > > 160 h_outer > > 90 v_outer > > 132 v_outer > > 133 v_outer > > 91 vcoffset > > 99 vcoffset > > 119 vcoffset > > 122 vcoffset > > 92 hcoffset > > 103 hcoffset > > 119 hcoffset > > 122 hcoffset > > 94 numberGlobal > > 94 numberGlobal > > 95 numberGlobal > > 130 numberGlobal > > 191 numberGlobal > > 330 numberGlobal > > 364 numberGlobal > > 371 numberGlobal > > 383 numberGlobal > > 390 numberGlobal > > 395 numberGlobal > > 399 numberGlobal > > 403 numberGlobal > > 95 number > > 118 number > > 122 number > > 128 number > > 140 number > > 140 number > > 145 number > > 153 number > > 153 number > > 157 number > > 162 number > > 96 asize > > 99 asize > > 103 asize > > 143 asize > > 155 asize > > 160 asize > > 318 asize > > 122 divisor > > 313 divisor > > 315 divisor > > 318 divisor > > 321 divisor > > 322 divisor > > 131 vertical > > 138 vertical > > 144 vertical > > 135 square > > 372 square > > 374 square > > 374 square > > 136 negsquare > > 373 negsquare > > 375 negsquare > > 375 negsquare > > 148 horisontal > > 151 horisontal > > 156 horisontal > > 315 fstor > > 316 fstor > > 320 storlek > > 321 storlek > > 322 storlek > > 341 canvas > > 342 canvas > > > > 16 unused variables > > -------------------- > > 168 initanime > > 177 stopanime > > 188 startPos > > 195 next > > 203 prev > > 211 setmax > > 224 stopzoom > > 230 zoomin > > 238 zoomout > > 246 square_size > > 254 offset > > 263 plusX > > 271 minusX > > 279 plusY > > 287 minusY > > 327 first_call > > > > > > If you view source in FireFox (26+?) you'll notice a number of broken html tags broken in your source code as well. > > > > According to <http://validator.w3.org/#validate_by_input> there are 56 Errors, 6 warnings > > > > From the FireFox console there are a couple more issues shown as well: > > > > "Expected color but found 'lightpurple'. Error in parsing value for 'background-color'. Declaration dropped." > > > > "Error in parsing value for 'width'. Declaration dropped." > > > > "The character encoding of the HTML document was not declared. The document will render with garbled text in some browser configurations if the document contains characters from outside the US-ASCII range. The character encoding of the page must be declared in the document or in the transfer protocol." > > > > "TypeError: arr[number] is undefined div.html:248" Well the unused variables are all functions, called from the form. Regarding the varnings about my operators, i guess i am using the old standard. When did zero get a separate operator? == != Regarding the undefined variables i am pretty sure most of them if not all is set from the form when needed and most of them also set global. And it really do not explain why two basicly identical functions can render different results. 1. The way i see it i can not resolve the issues with unused variables ... Functions without changing to Another paradigm then form, so what should i use instead? 2. The changed operator status for compare with zero i can and will change. 3. I can not see how the variables can be undefined, the ones who rules over the lesser is instansiated in the init function. And the init funciont is called from the body onLoad, so i really can't figure out how they can be undefined, especially since the initanimate() function work just fine. While the equivalent next() do not. I know it is up to me to resolve this, but since i have no idea what cause the logical failure i was thinking maybe someone spotted the error. I Think i have separated the logic from the paint and steering layer in a rather good way. And that is why i find it so strange i can not find the error.
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Modular implementation of paintout canvas introduce a myriad bugs jonas.thornvall@gmail.com - 2014-02-28 00:27 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-03 16:27 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs ompalompasales2@gmail.com - 2014-03-04 13:00 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs jonas.thornvall@gmail.com - 2014-03-05 08:31 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-05 16:08 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs jonas.thornvall@gmail.com - 2014-03-05 08:47 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs jonas.thornvall@gmail.com - 2014-03-05 11:39 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-05 12:48 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs jonas.thornvall@gmail.com - 2014-03-05 13:30 -0800
Re: Modular implementation of paintout canvas introduce a myriad bugs "Michael Haufe (TNO)" <tno@thenewobjective.com> - 2014-03-05 16:04 -0800
csiph-web