home *** CD-ROM | disk | FTP | other *** search
/ Wacky Windows Stuff... / WACKY.iso / toolbook / speed.tbk (.txt) < prev    next >
Asymetrix ToolBook File  |  1990-10-09  |  152KB  |  1,332 lines

  1. afterflip
  2.      H    p    
  3. recordfield id 214 ,recordfield id 215 ,recordfield id 216 ,recordfield id 217 ,recordfield id 218 ,recordfield id 219 ,recordfield id 220 ,recordfield id 221 ,recordfield id 222 ,recordfield id 223 ,recordfield id 224 ,recordfield id 225 ,recordfield id 226 ,recordfield id 227 ,recordfield id 228 ,recordfield id 229 ,recordfield id 230 ,recordfield id 231 ,recordfield id 232 ,recordfield id 233 ,recordfield id 234 ,recordfield id 235 ,recordfield id 236 ,recordfield id 237 ,recordfield id 238 ,recordfield id 239 ,recordfield id 240 ,recordfield id 241 ,recordfield id 242 ,recordfield id 243
  4. 4ox, oy, moved, prevpos
  5. 4ox, oy
  6. H0, ty - oy
  7. getcurrenttime()
  8. H200,0
  9. "This took" && getTime(
  10. ) && "
  11. buttonstilldown
  12. buttondown
  13. buttonup
  14. buttondoubleclick
  15. buttondown
  16. moved
  17. prevpos
  18. buttonstilldown
  19. buttonup
  20. buttonstilldown
  21. buttondoubleclick
  22. getcurrenttime
  23. This took
  24. getTime
  25. seconds to move.
  26. moved
  27. prevpos
  28. Does It Matter Where Objects Are?The Background
  29. Drag the arrow to a row of objects, then double click it.
  30. buttonup
  31. buttonup
  32. response
  33. Aw geeOkaylreadyr me?ha ha ha
  34. This tests redrawing of objects on the background and page.  
  35. The bottom two rows are draw objects on the page and background.
  36. 4ox, oy, moved, prevpos
  37. 4ox, oy
  38. H0, ty - oy
  39. getcurrenttime()
  40. H200,0
  41. "This took" && getTime(
  42. ) && "
  43. buttonstilldown
  44. buttondown
  45. buttonup
  46. buttondoubleclick
  47. buttondown
  48. moved
  49. prevpos
  50. buttonstilldown
  51. buttonup
  52. buttonstilldown
  53. buttondoubleclick
  54. getcurrenttime
  55. This took
  56. getTime
  57. seconds to move.
  58. moved
  59. prevpos
  60. There
  61. 4ox, oy, moved, prevpos
  62. 4ox, oy
  63. H0, ty - oy
  64. getcurrenttime()
  65. H200,0
  66. "This took" && getTime(
  67. ) && "
  68. buttonstilldown
  69. buttondown
  70. buttonup
  71. buttondoubleclick
  72. buttondown
  73. moved
  74. prevpos
  75. buttonstilldown
  76. buttonup
  77. buttonstilldown
  78. buttondoubleclick
  79. getcurrenttime
  80. This took
  81. getTime
  82. seconds to move.
  83. moved
  84. prevpos
  85. flipper
  86. afterflip
  87. enterpage
  88. enterpage
  89. "Now 
  90. good men 
  91. come 
  92. their country."
  93. getcurrenttime()
  94. "It took" && getTime(
  95. ) && "
  96. buttonup
  97. buttonup
  98. Now is the time for all good men to come to the aid of their country.
  99. getcurrenttime
  100. It took
  101. getTime
  102. seconds to do this.
  103. An Opaque Overlapping Field
  104. "Now 
  105. good men 
  106. come 
  107. their country."
  108. getcurrenttime()
  109. "It took" && getTime(
  110. ) && "
  111. buttonup
  112. buttonup
  113. Now is the time for all good men to come to the aid of their country.
  114. getcurrenttime
  115. It took
  116. getTime
  117. seconds to do this.
  118. A Transparent Overlapping Field
  119. "Now 
  120. good men 
  121. come 
  122. their country."
  123. getcurrenttime()
  124. "It took" && getTime(
  125. ) && "
  126. buttonup
  127. buttonup
  128. Now is the time for all good men to come to the aid of their country.
  129. getcurrenttime
  130. It took
  131. getTime
  132. seconds to do this.
  133. An Opaque Field
  134. "Now 
  135. good men 
  136. come 
  137. their country."
  138. getcurrenttime()
  139. "It took" && getTime(
  140. ) && "
  141. buttonup
  142. buttonup
  143. Now is the time for all good men to come to the aid of their country.
  144. getcurrenttime
  145. It took
  146. getTime
  147. seconds to do this.
  148. A Transparent Field
  149. Be Careful How You Place Fieldsdssssss
  150. The speed of typing or of displaying text through OpenScript can vary greatly: :, depending on:
  151. getcurrenttime()
  152. "It only took" && getTime(
  153. ) && "
  154. a list 
  155. 100 things."
  156. buttonup
  157. buttonup
  158. getcurrenttime
  159. It only took
  160. getTime
  161. seconds to pop a list of 100 things.
  162. The Right Way  -->  Pop
  163. getcurrenttime()
  164. "That was" && getTime(
  165. ) && "
  166. iterate through a list 
  167. 100 things."
  168. buttonup
  169. buttonup
  170. getcurrenttime
  171. That was
  172. getTime
  173. seconds to iterate through a list of 100 things.
  174. The Wrong Way  -->  Item
  175. An Obscure Concept:  Pop, Don't Steptep
  176. When referring to  items in a comma-separated list, don't step through items by saying  "item i of foo". Instead just pop a working copy of the list until it's null.
  177. to handle buttonup
  178.     system realList
  179.     local wrkList
  180.     set wrkList to realList
  181.     while wrkList is not null
  182.         pop wrkList
  183.         --do something with IT here
  184.     end
  185. to handle buttonup
  186.     system realList
  187.     step i from 1 to itemcount(realList)
  188.         get item i of realList
  189.         --do something with IT here
  190.     end
  191.     end
  192. Some Common Sense.... Sense...
  193. Use a common background for similar pages
  194. Minimize the number of objects on the page and background
  195. Group objects only when your scripts require it
  196. Clip bitmaps to as small a size as possible
  197. Clean up your books before distributing themed rectangular ones
  198. Avoid overlapping objects such as data fields and their labels
  199. Use a background pattern of none if you're brave
  200. Don't wrap text in fields if you can instead fit it all on one lineve
  201. Don't wrap text in fields if you can instead fit it all on one linerap text in fields if you can instead fit it all on one line
  202. Maybe These Aren't So Obvious...o
  203. Cache property values and object references into variables
  204. "Clear" properties or variables instead of setting them to null
  205. Put keyDown/Up/Char handlers only where they're needed
  206. Limit code in your Idle handler
  207. Use the "character" string specifier over "word" or textline"
  208. Pre-flip pages before showing the main windowowwndown windowwre showing the main window
  209. "cache"
  210. "udp"
  211. terpage
  212. leavepage
  213. enterpage
  214. enterpage
  215. leavepage
  216. cache
  217. "cache"
  218. getcurrenttime()
  219. "It only took" && getTime(
  220. ) && "
  221. refer 
  222. a property value that was cached 
  223. buttonup
  224. buttonup
  225. cache
  226. getcurrenttime
  227. It only took
  228. getTime
  229. seconds to refer to a property value that was cached in a local variable.
  230. Cache A Property
  231. getcurrenttime()
  232. "However 
  233. took" && getTime(
  234. ) && "
  235. refer directly 
  236. a default property 2000 times."
  237. buttonup
  238. buttonup
  239. getcurrenttime
  240. However it took
  241. getTime
  242. seconds to refer directly to a default property 2000 times.
  243. Refer To A Default Property
  244. Referring to Properties vs. Caching Them
  245. If you need to refer to a property of an object more than once in a handler, or series of handlers, it will be much faster to set a variable to that value, and then refer to that variable instead of the property.  This is especially true for user-defined properties, which take twice as long to get as default properties do.
  246. "udp"
  247. getcurrenttime()
  248. "And 
  249. took" && getTime(
  250. ) && "
  251. refer 
  252. a user-defined property 2000 times."
  253. buttonup
  254. buttonup
  255. getcurrenttime
  256. And it took
  257. getTime
  258. seconds to refer to a user-defined property 2000 times.
  259. Refer To A User-Defined Property
  260. cache
  261. to handle buttonup  
  262.     set bar to name of this page
  263.     step i from 1 to 2000
  264.         set foo to bar
  265.     end
  266.   end
  267.     set syscursor to 1
  268. foo to t
  269.     end
  270.     beep 1
  271.     set syscursor to 1
  272. to handle buttonup  
  273.  step i from 1 to 2000
  274.         set foo to name of this page
  275.     end
  276.     set syscursor to 1
  277.  of this page
  278.     end
  279.     beep 1
  280.     set syscursor to 1
  281. et syscursor to 1
  282. to handle buttonup  
  283.     step i from 1 to 2000
  284.         set foo to bar of this page
  285.     end
  286. i from 1 to 2000
  287.         set xoo to foo of this page
  288.     end
  289.    set syscursor to 1
  290. et syscursor to 1
  291. yellow
  292. getcurrenttime()
  293. "It took" && (
  294. )/1000 && "
  295. a message 
  296. here."
  297. buttonup
  298. buttonup
  299. getcurrenttime
  300. It took
  301. getcurrenttime
  302. seconds for a message to get here.
  303. Send Message (Book Handler)
  304. getcurrenttime()
  305. "It took" && getTime(
  306. ) && "
  307. a message 
  308. up the hierarchy 
  309. 1000 times."
  310. buttonup
  311. buttonup
  312. getcurrenttime
  313. It took
  314. getTime
  315. seconds for a message to float up the hierarchy to the book script 1000 times.
  316. Send Message (Book Handler)
  317. getcurrenttime()
  318. "It took" && getTime(
  319. ) && "
  320. a message 
  321. up the hierarchy 
  322. 1000 times."
  323. buttonup
  324. buttonup
  325. getcurrenttime
  326. ^}mbg
  327. It took
  328. getTime
  329. seconds for a message to float up the hierarchy to the background script 1000 times.
  330. Send Message (Background Handler)
  331. getcurrenttime()
  332. "It took" && getTime(
  333. ) && "
  334. a message 
  335. up the hierarchy 
  336. 1000 times."
  337. buttonup
  338. buttonup
  339. getcurrenttime
  340. It took
  341. getTime
  342. seconds for a message to float up the hierarchy to the page script 1000 times.
  343. Send Message (Page Handler)
  344. getcurrenttime()
  345. "It took" && getTime(
  346. ) && "
  347. a message 
  348. be sent directly 
  349. 1000 times."
  350. buttonup
  351. buttonup
  352. getcurrenttime
  353. It took
  354. getTime
  355. seconds for a message to be sent directly to the book script 1000 times.
  356. Send Directly To Book Handler
  357. getcurrenttime()
  358. "It took" && getTime(
  359. ) && "
  360. a message 
  361. be sent directly 
  362. 1000 times."
  363. buttonup
  364. buttonup
  365. getcurrenttime
  366. o^}mbg
  367. It took
  368. getTime
  369. seconds for a message to be sent directly to the background script 1000 times.
  370. Send Directly To Background Handler
  371. getcurrenttime()
  372. "It took" && getTime(
  373. ) && "
  374. a message 
  375. be sent directly 
  376. 1000 times."
  377. buttonup
  378. buttonup
  379. getcurrenttime
  380. oi_mp
  381. It took
  382. getTime
  383. seconds for a message to be sent directly to the page script 1000 times.
  384. Send Directly To Page Handler
  385. The Hierarchy And Message Passing
  386. Where should you put your scripts?  This should give you a clue.  The yellow button does the same as the top green button, but from the bottom of a deeply nested group.oup.
  387. enterpage
  388. leavepage
  389. enterpage
  390. leavepage
  391. getcurrenttime()
  392. H15,0
  393. "It took" && getTime(
  394. ) && "
  395. on the 
  396. 200 times 
  397. Hreferencing 
  398. directly."
  399. 105,4500
  400. buttonup
  401. buttonup
  402. getcurrenttime
  403. It took
  404. getTime
  405. seconds to move a rectangle on the page 200 times by referencing it directly.
  406. Reference a Page Object
  407. Referring to Objects vs. Caching Themhem
  408. Just as caching a property value into a varible increases performance, so will caching a refence to an object.  For instance you can say:  
  409.     set foo to button "total" of this background.
  410. Then refence foo instead of the button.  It'll be alot faster.properties, which take twice as long to get as default properties do.
  411. getcurrenttime()
  412. H15,0
  413. "It took" && getTime(
  414. ) && "
  415. on the 
  416. 200 times 
  417. caching a reference 
  418. 105,4500
  419. buttonup
  420. buttonup
  421. getcurrenttime
  422. It took
  423. getTime
  424. seconds to move a rectangle on the page 200 times after caching a reference to it.
  425. Reference a Cached Page Object
  426. getcurrenttime()
  427. H15,0
  428. "It took" && getTime(
  429. ) && "
  430. on the 
  431. /200 times 
  432. Hreferencing 
  433. directly."
  434. 105,4800
  435. buttonup
  436. buttonup
  437. getcurrenttime
  438. It took
  439. getTime
  440. seconds to move a rectangle on the background 200 times by referencing it directly.
  441. Reference a Background Object
  442. getcurrenttime()
  443. H15,0
  444. "It took" && getTime(
  445. ) && "
  446. on the 
  447. /200 times 
  448. caching a reference 
  449. 105,4800
  450. buttonup
  451. buttonup
  452. getcurrenttime
  453. It took
  454. getTime
  455. seconds to move a rectangle on the background 200 times after caching a reference to it.
  456. Reference a Cached Background Object
  457. moregroup
  458. morelist
  459. leavepage
  460. leavepage
  461. morelist
  462. moregroup
  463. /B3L6
  464. field id 302 of page id 37,field id 303 of page id 37,field id 304 of page id 37,field id 305 of page id 37,field id 306 of page id 37,field id 307 of page id 37,field id 308 of page id 37,field id 309 of page id 37,field id 310 of page id 37,field id 311 of page id 37,field id 312 of page id 37,field id 313 of page id 37,field id 314 of page id 37,field id 315 of page id 37,field id 316 of page id 37,field id 317 of page id 37,field id 318 of page id 37,field id 319 of page id 37,field id 320 of page id 37,field id 321 of page id 37,field id 322 of page id 37
  465. rectangle id 247 of page id 37,rectangle id 248 of page id 37,rectangle id 249 of page id 37,rectangle id 250 of page id 37,rectangle id 251 of page id 37,rectangle id 252 of page id 37,rectangle id 253 of page id 37,rectangle id 254 of page id 37,rectangle id 255 of page id 37,rectangle id 256 of page id 37,rectangle id 257 of page id 37,rectangle id 258 of page id 37,rectangle id 259 of page id 37,rectangle id 260 of page id 37,rectangle id 261 of page id 37,rectangle id 262 of page id 37,rectangle id 263 of page id 37,rectangle id 264 of page id 37,rectangle id 265 of page id 37,rectangle id 266 of page id 37,rectangle id 267 of page id 37,rectangle id 268 of page id 37,rectangle id 269 of page id 37,rectangle id 270 of page id 37,rectangle id 271 of page id 37,rectangle id 272 of page id 37,rectangle id 273 of page id 37,rectangle id 274 of page id 37,rectangle id 275 of page id 37,rectangle id 276 of page id 37,rectangle id 277 of page id 37,rectangle id 278 of page id 37,rectangle id 279 of page id 37,rectangle id 280 of page id 37,rectangle id 281 of page id 37,rectangle id 282 of page id 37,rectangle id 283 of page id 37,rectangle id 284 of page id 37,rectangle id 285 of page id 37,rectangle id 286 of page id 37,rectangle id 287 of page id 37,rectangle id 288 of page id 37,rectangle id 289 of page id 37,rectangle id 290 of page id 37,rectangle id 291 of page id 37,rectangle id 292 of page id 37,rectangle id 293 of page id 37,rectangle id 294 of page id 37,rectangle id 295 of page id 37,rectangle id 296 of page id 37,rectangle id 297 of page id 37,rectangle id 298 of page id 37,rectangle id 299 of page id 37,rectangle id 300 of page id 37
  466. field id 123 of page id 37,field id 124 of page id 37,field id 125 of page id 37,field id 126 of page id 37,field id 127 of page id 37,field id 128 of page id 37,field id 129 of page id 37,field id 130 of page id 37,field id 131 of page id 37,field id 132 of page id 37,field id 133 of page id 37,field id 134 of page id 37,field id 135 of page id 37,field id 136 of page id 37,field id 144 of page id 37,field id 145 of page id 37,field id 146 of page id 37,field id 147 of page id 37,field id 148 of page id 37,field id 149 of page id 37,field id 150 of page id 37,field id 151 of page id 37,field id 152 of page id 37,field id 153 of page id 37,field id 154 of page id 37,field id 155 of page id 37,field id 156 of page id 37,field id 157 of page id 37,field id 158 of page id 37,field id 159 of page id 37,field id 160 of page id 37,field id 161 of page id 37,field id 162 of page id 37,field id 163 of page id 37,field id 164 of page id 37,field id 165 of page id 37,field id 166 of page id 37,field id 167 of page id 37,field id 168 of page id 37,field id 169 of page id 37,field id 170 of page id 37,field id 171 of page id 37,field id 172 of page id 37,field id 173 of page id 37,field id 174 of page id 37,field id 175 of page id 37,field id 176 of page id 37,field id 177 of page id 37,field id 178 of page id 37,field id 179 of page id 37,field id 180 of page id 37,field id 181 of page id 37,field id 182 of page id 37,field id 183 of page id 37,field id 184 of page id 37,field id 185 of page id 37,field id 186 of page id 37,field id 187 of page id 37,field id 188 of page id 37,field id 189 of page id 37,field id 190 of page id 37,field id 191 of page id 37,field id 192 of page id 37,field id 193 of page id 37,field id 194 of page id 37,field id 195 of page id 37,field id 196 of page id 37,field id 197 of page id 37,field id 205 of page id 37,field id 206 of page id 37,field id 207 of page id 37,field id 208 of page id 37,field id 209 of page id 37,field id 210 of page id 37,field id 211 of page id 37,field id 212 of page id 37,field id 213 of page id 37,field id 214 of page id 37,field id 215 of page id 37,field id 216 of page id 37,field id 217 of page id 37,field id 218 of page id 37,field id 219 of page id 37,field id 220 of page id 37,field id 221 of page id 37
  467. Using Groups And Lists Of Object References Speed
  468. explanation
  469. Stuff In A Group
  470. The GroupA Group
  471. buttonup
  472. buttonup
  473. When you assign a property value to a group, that value propagates on down to the objects of the group.
  474. 120,50,100
  475. 0,50,100
  476. 60,50,100
  477. 240,50,100
  478. 0,100,0
  479. 0,0,0
  480. 180,50,100
  481. 300,50,100
  482. country
  483. ll > 0
  484. getcurrenttime()
  485. B"a" 
  486. B"b" 
  487. B"c" 
  488. "This took" && getTime(
  489. ) && "
  490. buttonup
  491. buttonup
  492. textfrompoint
  493. getcurrenttime
  494. This took
  495. getTime
  496. seconds.
  497. i:to1
  498. System
  499. Terminal
  500. Courier
  501. Tms Rmn
  502. Symbol
  503. Roman
  504. Scriptnnnnnnnn
  505. ll > 0
  506. getcurrenttime()
  507. B"a" 
  508. B"b" 
  509. B"c" 
  510. "This took" && getTime(
  511. ) && "
  512. buttonup
  513. buttonup
  514. textfrompoint
  515. getcurrenttime
  516. This took
  517. getTime
  518. seconds.
  519. i:to1
  520. Green
  521. Yellow
  522. White
  523. Black
  524. Magenta
  525. buttonup
  526. buttonup
  527. As Individual Items
  528. As A List Of Items
  529. As A Group
  530. moregroup
  531. buttonup
  532. buttonup
  533. moregroup
  534. morelist
  535. buttonup
  536. buttonup
  537. morelist
  538. morelist
  539. Lists of object references can be very handy.  As an author tool, the system variable Selection is great to use for setting properties of many objects at once.  Just select all the objects that you want to change and then set a property of Selection to whatever value you want.  That value will propagate on down to all the objects in selection.
  540. If you want to clear or set the text of many recordfields, use a list of references to the recordfields without the "of background" specifier in each reference.....
  541. buttonup
  542. buttonup
  543. moregroup
  544. One good use for groups is controlling the checking of a series of radio buttons.  If you group a set of related radio buttons, you can then set the checked property of that group to FALSE.  All the radio buttons will become unchecked.  An example of the radio button group's script might be:
  545.     to handle buttonup
  546.         set my checked to FALSE
  547.         set checked of target to TRUE
  548.     endUE
  549.     endenddUE
  550. buttonup
  551. buttonup
  552. You can set properties of many objects at the same time by making a list of object references to all the objects, and then setting a property of the list, or grouping all the objects and then setting the property of the group, even if that property isn't a default property for a group.
  553. grouping all the objects and then setting the property of the group, even if that property isn't a default property for a group.
  554. Click a radio button, and then one of the green shadowed fields to see the difference.e group, even if that property isn't a default property for a group.
  555. Click a radio button, and then a green shadowed field to see the difference..fference...ty isn't a default property for a group.
  556. Click a radio button, and then one of the green shadowed fields to see the difference.e group, even if that property isn't a default property for a group.
  557. "test"
  558. getcurrenttime()
  559. o(48 + 
  560. (80)) 
  561. "It took" && getTime(
  562. ) && "
  563. buttonup
  564. buttonup
  565. getcurrenttime
  566. It took
  567. getTime
  568. seconds to do this.
  569. The Cost of Character and Paragraph Properties
  570. Character and paragraph properties have an effect on the speed of displaying text.  The Test button on this page puts 200 random characters after the text of the yellow field.  Set character and paragraph properties of the yellow field with the two green buttons, and then click the test button.
  571. 7[7|RNo5iZ
  572. 3<FDV}evTyYO\vFaZNhH[JG^asj~ye:{Zvibaer|{v2yrmWzlHX}`bv~KvR|BA_J9[hgSFUPKHzTrfQ9yrz}2W_o2q}o:2@cfs]leXfI{wJ:sz{G9CtrWP[J~?SqgSe
  573. B>O4Myro1>L3D`rH5peFF\yrz6x=oG7ImtY>?Oc|RP1AL6wm?hID^A?C
  574. "test"
  575. buttonup
  576. buttonup
  577. character
  578. Choose Character Properties
  579. "test"
  580. buttonup
  581. buttonup
  582. paragraph
  583. Choose Paragraph Properties
  584. leavepage
  585. leavepage
  586. &    N    v    
  587. angled
  588. button
  589. curve
  590. ellipse
  591. field
  592. irregular
  593. polygon
  594. line+
  595. polygon
  596. record
  597. field
  598. rectangle
  599. Button
  600. How Big Are Objects? (in bytes)
  601. buttonup
  602. buttonup
  603. More Info
  604. These statistics were found by creating an empty book, drawing an object, and then saving the book.  A seperate book was saved for each kind of object.  An empty book was 6588 bytes.  Note that this may not be completely reliable, but it does give you some indication of the cost of each object type.
  605. buttonup
  606. buttonup
  607. System
  608. hD|D|
  609. `D|D|
  610. `D|D|
  611. Tms Rmn
  612. `D|D|
  613. `D|D|
  614. Optimizing Your ToolBook Apps
  615. s Rmn
  616. hD|D|
  617. s Rmn
  618. hD|D|
  619. s Rmn
  620. hD|D|
  621. s Rmn
  622. hD|D|
  623. hD|D|
  624. hD|D|
  625. hD|D|
  626. hD|D|
  627. hD|D|
  628. hD|D|
  629. fOldTime
  630. s Rmn
  631. hD|D|
  632. 4svHaHa
  633. X"user.exe"
  634. DWORD getcurrenttime()
  635. getTime fOldTime
  636. )/1000
  637. %"#.00"
  638. enterbook
  639. getTime
  640. enterbook
  641. sizetopage
  642. seconds
  643. user.exe
  644. getcurrenttime
  645. svHaHa
  646. getTime
  647. getcurrenttime
  648. fOldTime
  649. hD|D|
  650. hD|D|
  651. hD|D|
  652. hD|D|
  653. gD|D|
  654. system
  655. hD|D|
  656. Tms Rmn
  657. gD|D|
  658. Modern
  659. hD|D|
  660. buttonup
  661. buttonup
  662. response
  663.  I'm shufflin'dyr me?ha ha ha
  664. k8 = 0
  665. "brows" 
  666. H0,-50
  667. H0,50
  668. H0,-50
  669. H0,50
  670. k2 = 0
  671. brows
  672. brows
  673. brows
  674. brows
  675. brows
  676. bigsmile
  677. Button
  678. A Carelessly Built Bookok
  679. Efficient Clean
  680.  Concise Book
  681. Defunct User 
  682. Defined Properties
  683. Old Hidden 
  684. Objects
  685. Unused
  686. Unnecessary references to proper+
  687. Overlapping
  688. Objects
  689. Unnecessary references to property values
  690. Will your books ever be as fast as this Zillion Dollar Car?Could Be Your Bookk
  691. 404V4|4
  692. 7(8P8
  693. B<BjB
  694. C4ChC
  695. D8DlD
  696. EDEzE
  697. F*G`G
  698. H8HnH
  699. H&ITI
  700. J8JdJ
  701. K@K~K
  702. frame2
  703. setup
  704. 4currmo, curryear, stilldown, 
  705. B"bmobutton"
  706. %"m" 
  707. B"byrbutton" 
  708. buildcal m, y
  709. Ztotdays, wrkday, i
  710. getcurrenttime()
  711. weekDay(1, m, y)
  712. T - 1
  713. B("b" & i)
  714. daysInMonth(m)
  715. B("b" & 
  716. B("b" & i)
  717. "Whew!
  718. It took me" && getTime(
  719. ) && "
  720.  d, m, y
  721. 4leapyear
  722. Zmfactor, cfactor
  723. Zday1, yr
  724. k4 = 0 
  725. k100 <> 0) 
  726. k400 = 0)
  727. "034025036146"
  728. "144025036146"
  729. y >= 1900 
  730. y <= 1999
  731. y >= 1700 
  732. y <= 1799
  733. y >= 1800 
  734. y <= 1899
  735. y >= 2000 
  736. y <= 2099
  737. y >= 2100 
  738. y <= 2199
  739. (yr + (yr 
  740. y4) + 
  741.  + d + 
  742. m <> 2
  743. "31,28,31,30,31,30,31,31,30,31,30,31"
  744. displayDate m, y
  745. %"M" 
  746. buildcal
  747. setup
  748. displayDate
  749. weekDay
  750. daysInMonth
  751. setup
  752. bmobutton
  753. byrbutton
  754. currmo
  755. curryear
  756. stilldown
  757. setup
  758. buildcal
  759. getcurrenttime
  760. weekDay
  761. daysInMonth
  762. Whew!  It took me
  763. getTime
  764. seconds to draw.
  765. totdays
  766. wrkday
  767. weekDay
  768. 034025036146
  769. 144025036146
  770. mfactor
  771. cfactor
  772. leapyear
  773. daysInMonth
  774. 31,28,31,30,31,30,31,31,30,31,30,31
  775. leapyear
  776. displayDate
  777. bmobutton
  778. byrbutton
  779. hilight
  780. false
  781. byrbutton
  782. 4currmo, curryear, stilldown, setup
  783. "frame2"
  784. B"byrbutton" = 1700 
  785. B"bmobutton" 
  786. "January"
  787. displaydate 
  788. buildcal 
  789. buttonup
  790. buttonstilldown
  791. buttonup
  792. setup
  793. frame2
  794. byrbutton
  795. bmobutton
  796. January
  797. displaydate
  798. frame2
  799. oHSbuildcal
  800. frame2
  801. currmo
  802. curryear
  803. stilldown
  804. setup
  805. buttonstilldown
  806. setup
  807. frame2
  808. byrbutton
  809. bmobutton
  810. January
  811. displaydate
  812. frame2
  813. setup
  814. currmo
  815. curryear
  816. stilldown
  817. 4currmo, curryear, stilldown, setup
  818. "frame2"
  819. B"byrbutton" = 2199 
  820. B"bmobutton" 
  821. "December"
  822.  > 12
  823. displaydate 
  824. buildcal 
  825.  > 12
  826. buttonup
  827. buttonstilldown
  828. buttonup
  829. setup
  830. frame2
  831. byrbutton
  832. bmobutton
  833. December
  834. displaydate
  835. frame2
  836. oHSbuildcal
  837. frame2
  838. currmo
  839. curryear
  840. stilldown
  841. setup
  842. buttonstilldown
  843. setup
  844. frame2
  845. byrbutton
  846. bmobutton
  847. December
  848. displaydate
  849. frame2
  850. setup
  851. currmo
  852. curryear
  853. stilldown
  854. 4currmo, curryear, stilldown, setup
  855. "frame2"
  856. B"byrbutton" = 1700
  857. displaydate 
  858. buildcal 
  859. buttonup
  860. buttonstilldown
  861. buttonup
  862. setup
  863. frame2
  864. byrbutton
  865. displaydate
  866. frame2
  867. oHSbuildcal
  868. frame2
  869. currmo
  870. curryear
  871. stilldown
  872. setup
  873. buttonstilldown
  874. setup
  875. frame2
  876. byrbutton
  877. displaydate
  878. frame2
  879. setup
  880. currmo
  881. curryear
  882. stilldown
  883. 4currmo, curryear, stilldown, setup
  884. "frame2"
  885. B"byrbutton" = 2199
  886. displaydate 
  887. buildcal 
  888. buttonup
  889. buttonstilldown
  890. buttonup
  891. setup
  892. frame2
  893. byrbutton
  894. displaydate
  895. frame2
  896. oHSbuildcal
  897. frame2
  898. currmo
  899. curryear
  900. stilldown
  901. setup
  902. buttonstilldown
  903. setup
  904. frame2
  905. byrbutton
  906. displaydate
  907. frame2
  908. setup
  909. currmo
  910. curryear
  911. stilldown
  912. bmobutton
  913. A Tale of Two Border Styles
  914. vs...
  915. A Slow Boat to China Styles
  916. Rounded edged objects        take as much as 12 times the time to image as objects with sharp corners.        For best performance, avoid their use.  Click the green arrow buttons on each calendar to see the difference.
  917. frame1
  918. setup
  919. 4currmo, curryear, stilldown, 
  920. B"amobutton"
  921. %"m" 
  922. B"ayrbutton" 
  923. buildcal m, y
  924. Ztotdays, wrkday, i
  925. getcurrenttime()
  926. weekDay(1, m, y)
  927. T - 1
  928. B("a" & i)
  929. daysInMonth(m)
  930. B("a" & 
  931. B("a" & i)
  932. "It only took me" && getTime(
  933. ) && "
  934.  d, m, y
  935. 4leapyear
  936. Zmfactor, cfactor
  937. Zday1, yr
  938. k4 = 0 
  939. k100 <> 0) 
  940. k400 = 0)
  941. "034025036146"
  942. "144025036146"
  943. y >= 1900 
  944. y <= 1999
  945. y >= 1700 
  946. y <= 1799
  947. y >= 1800 
  948. y <= 1899
  949. y >= 2000 
  950. y <= 2099
  951. y >= 2100 
  952. y <= 2199
  953. (yr + (yr 
  954. y4) + 
  955.  + d + 
  956. m <> 2
  957. "31,28,31,30,31,30,31,31,30,31,30,31"
  958. displayDate m, y
  959. %"M" 
  960. buildcal
  961. setup
  962. displayDate
  963. weekDay
  964. daysInMonth
  965. setup
  966. amobutton
  967. ayrbutton
  968. currmo
  969. curryear
  970. stilldown
  971. setup
  972. buildcal
  973. getcurrenttime
  974. weekDay
  975. daysInMonth
  976. It only took me
  977. getTime
  978. seconds to draw.
  979. totdays
  980. wrkday
  981. weekDay
  982. 034025036146
  983. 144025036146
  984. mfactor
  985. cfactor
  986. leapyear
  987. daysInMonth
  988. 31,28,31,30,31,30,31,31,30,31,30,31
  989. leapyear
  990. displayDate
  991. amobutton
  992. ayrbutton
  993. Ahilight
  994. false
  995. ayrbutton
  996. 4currmo, curryear, stilldown, setup
  997. "frame1"
  998. B"ayrbutton" = 1700 
  999. B"amobutton" 
  1000. "January"
  1001. displaydate 
  1002. buildcal 
  1003. buttonup
  1004. buttonstilldown
  1005. buttonup
  1006. setup
  1007. frame1
  1008. ayrbutton
  1009. amobutton
  1010. January
  1011. displaydate
  1012. frame1
  1013. oHSbuildcal
  1014. frame1
  1015. currmo
  1016. curryear
  1017. stilldown
  1018. setup
  1019. buttonstilldown
  1020. setup
  1021. frame1
  1022. ayrbutton
  1023. amobutton
  1024. January
  1025. displaydate
  1026. frame1
  1027. setup
  1028. currmo
  1029. curryear
  1030. stilldown
  1031. 4currmo, curryear, stilldown, setup
  1032. "frame1"
  1033. B"ayrbutton" = 2199 
  1034. B"amobutton" 
  1035. "December"
  1036.  > 12
  1037. displaydate 
  1038. buildcal 
  1039.  > 12
  1040. buttonup
  1041. buttonstilldown
  1042. buttonup
  1043. setup
  1044. frame1
  1045. ayrbutton
  1046. amobutton
  1047. December
  1048. displaydate
  1049. frame1
  1050. oHSbuildcal
  1051. frame1
  1052. currmo
  1053. curryear
  1054. stilldown
  1055. setup
  1056. buttonstilldown
  1057. setup
  1058. frame1
  1059. ayrbutton
  1060. amobutton
  1061. December
  1062. displaydate
  1063. frame1
  1064. setup
  1065. currmo
  1066. curryear
  1067. stilldown
  1068. 4currmo, curryear, stilldown, setup
  1069. "frame1"
  1070. B"ayrbutton" = 1700
  1071. displaydate 
  1072. buildcal 
  1073. buttonup
  1074. buttonstilldown
  1075. buttonup
  1076. setup
  1077. frame1
  1078. ayrbutton
  1079. displaydate
  1080. frame1
  1081. oHSbuildcal
  1082. frame1
  1083. currmo
  1084. curryear
  1085. stilldown
  1086. setup
  1087. buttonstilldown
  1088. setup
  1089. frame1
  1090. ayrbutton
  1091. displaydate
  1092. frame1
  1093. setup
  1094. currmo
  1095. curryear
  1096. stilldown
  1097. 4currmo, curryear, stilldown, setup
  1098. "frame1"
  1099. B"ayrbutton" = 2199
  1100. displaydate 
  1101. buildcal 
  1102. buttonup
  1103. buttonstilldown
  1104. buttonup
  1105. setup
  1106. frame1
  1107. ayrbutton
  1108. displaydate
  1109. frame1
  1110. oHSbuildcal
  1111. frame1
  1112. currmo
  1113. curryear
  1114. stilldown
  1115. setup
  1116. buttonstilldown
  1117. setup
  1118. frame1
  1119. ayrbutton
  1120. displaydate
  1121. frame1
  1122. setup
  1123. currmo
  1124. curryear
  1125. stilldown
  1126. amobutton
  1127. February
  1128. Racer X
  1129.  8!~!>&s
  1130. Using SysLockScreen
  1131. (16) 
  1132. "Now,
  1133. ,the,
  1134. ,good,men,
  1135. ,come,
  1136. ,their,country" 
  1137. buttonup
  1138. buttonup
  1139. Now,is,the,time,for,all,good,men,to,come,to,the,aid,of,their,country
  1140. Fill 'em up with junk
  1141. "Please click the 
  1142. getcurrenttime()
  1143. "It took" && getTime(
  1144. ) && "
  1145. each 
  1146. without 
  1147. buttonup
  1148. buttonup
  1149. Please click the blue button first.
  1150. getcurrenttime
  1151. It took
  1152. getTime
  1153. seconds to clear the text of each field without using sysLockScreen.
  1154. Clearing Fields w/o SysLockScreen
  1155. "Please click the 
  1156. getcurrenttime()
  1157. "However, 
  1158. only took" && getTime(
  1159. ) && "
  1160. TRUE, 
  1161. FFALSE."
  1162. buttonup
  1163. buttonup
  1164. Please click the blue button first.
  1165. getcurrenttime
  1166. However, it only took
  1167. getTime
  1168. seconds when sysLockScreen was set to TRUE, then FALSE.
  1169. Clear w/ SysLockScreen
  1170. The 4 blue buttons clear the text of these fields in different ways.  Click the yellow button to put text into the fields, then try the blue buttons to clear the text.
  1171. 4doneit
  1172. reset
  1173. 85,1410
  1174. 40,2610
  1175. answer
  1176. explain
  1177. enterpage
  1178. reset
  1179. enterpage
  1180. reset
  1181. doneit
  1182. reset
  1183. explain
  1184. answer
  1185. -n.8/
  1186. 4doneit
  1187. currObj 
  1188. k2 = 0
  1189. getcurrenttime()
  1190. + 1000
  1191. H100,0
  1192. p> 8130
  1193. H-100,0
  1194. H100,0
  1195. reset
  1196. buttonup
  1197. buttonup
  1198. getcurrenttime
  1199. getcurrenttime
  1200. reset
  1201. currObj
  1202. doneit
  1203. Start The Race
  1204. Which are faster, paint objects or groups?
  1205. Sometimes its better to use a paint object than a group if the group is small
  1206. and complicated.  What do you think will be faster in this race?
  1207. :PHYSSIZE
  1208. """""
  1209. """" 
  1210. "" " 
  1211. "" "" 
  1212. " """ 
  1213.   " " 
  1214. " """" """ """""
  1215. """ """""
  1216. """""
  1217. """""
  1218. """"" """"
  1219. """"" "
  1220. """"""" """"
  1221. """"""  """
  1222.  "" """""""
  1223. """"""" """
  1224. """"" """""
  1225. """""
  1226. "" """""
  1227. """" """""""""""
  1228. """"""" """""
  1229. """""""""" 
  1230. """"""" """" """""""""""
  1231. "" """"""""
  1232.  """"""""" 
  1233. "" """"""""""" " """"""""" 
  1234. "" " """""""""  
  1235. """""""""
  1236. """""""""" 
  1237. """"""""
  1238. """""""""
  1239. """"""""  
  1240. """""" 
  1241.  """""""""
  1242. """""" 
  1243. """"""""
  1244. """"""""""""""
  1245. """""""""""""  "
  1246. """"""""""""" 
  1247. """"""
  1248.  " " 
  1249. V*`    &
  1250. answer
  1251. This was the group.
  1252. This was the paint object..
  1253. Bets on the paint object:
  1254. Bets on the group:ects
  1255. 00ts on the paint object:
  1256. 06ts on the group:ects
  1257. Sometimes it's better to use a paint object than a group if the group is small and complicated.  What do you think will be faster in this race?
  1258. buttonup
  1259. buttonup
  1260. buttonup
  1261. buttonup
  1262. buttonup
  1263. buttonup
  1264. buttonup
  1265. buttonup
  1266. 4doneit
  1267. "Hey, you haven't even 
  1268. the race yet!"
  1269. answer
  1270. buttonup
  1271. buttonup
  1272. Hey, you haven't even run the race yet!
  1273. answer
  1274. doneit
  1275. And The Winner Is...
  1276. "explain"
  1277. buttonup
  1278. buttonup
  1279. explain
  1280. How This Was Done
  1281. explain
  1282. An loop allowed each object to move 100 page units as many times as it could in 1 second until that object crossed the finish line.ge units as many times as it could.
  1283. explain
  1284. buttonup
  1285. buttonup
  1286. explain
  1287. flipper
  1288. Small pages = fast page navigation.
  1289. Let's check it out.  Click the Flip button.
  1290. flipper
  1291. "afterflip"
  1292. buttonup
  1293. buttonup
  1294. afterflip
  1295. response
  1296. Allright alreadyding ha ha ha
  1297. 8640,5760
  1298. buttonup
  1299. buttonup
  1300. sizetopage
  1301. 6 x 4
  1302. 7200,4320
  1303. buttonup
  1304. buttonup
  1305. sizetopage
  1306. 5 x 3
  1307. 5760,2880
  1308. buttonup
  1309. buttonup
  1310. sizetopage
  1311. 4 x 2
  1312. 4320,1440
  1313. buttonup
  1314. buttonup
  1315. sizetopage
  1316. 3 x 1
  1317. getcurrenttime()
  1318. "flipper"
  1319. "This 
  1320. took" && getTime(
  1321. ) && "
  1322. buttonup
  1323. buttonup
  1324. getcurrenttime
  1325. flipper
  1326. This flip took
  1327. getTime
  1328. seconds.
  1329. Flip The Face
  1330. flipper
  1331. B    lX@
  1332.