;;;; SUMMARY ;; This is the model that is shown when an invalid model name is requested--your bookmark may be out of date! ;;;; COPYRIGHT ;; Copyright (C) 2005 James P. Steiner ;; ;; ;; globals [ marq-go? marq-row marq-text marq-speed marq-len ] to startup ca ask random-n-of 25 patches [ sprout 1 [ set shape "blank" set label "?" ] ] marquee-start "Greetings From TurtleZERO.com! The requested model does not exist, or may have been updated. Please check the models menu for your model!" 0 ;; row .1 ;; speed end to go set marq-go? false end ;; ;; ;; TURTLE ZERO WEB APPLET FUNCTIONS ;; to marquee-start [ marq-text-in marq-row-in marq-speed-in ] set marq-go? true set marq-text marq-text-in set marq-row-in int marq-row-in set marq-row patches with [ pycor = marq-row-in ] set marq-speed marq-speed-in let num 0 set marq-len length marq-text + screen-size-x ask marq-row [ set plabel-color YELLOW ] while [ marq-go? = true ] [ marquee-frame num wait marq-speed set num num + 1 if num = marq-len [ set num 0 ] ] if ( marq-go? = false ) [ marquee-frame -1 ] end to marquee-frame [ num ] let col-off (- screen-edge-x ) let l length marq-text ask marq-row [ let char pxcor + col-off + num ifelse char < 0 or char >= l [ set plabel no-label ] [ set plabel substring marq-text char (char + 1) ] ] marquee-animation display end to marquee-animation ask turtles [ jump .2 rt 5 ] end @#$#@#$#@ GRAPHICS-WINDOW 0 10 535 216 10 3 25.0 1 48 1 1 1 0 0 0 1 CC-WINDOW 5 263 544 358 Command Center 0 BUTTON 0 216 535 249 Stop Scrolling Message go NIL 1 T OBSERVER NIL S @#$#@#$#@ WHAT IS IT? ----------- This is a model that is displayed when a mode-run request is made where the model name in the URL is not a model that can be found on the server. Instead of a special error message, or (far worse) a PHP runtime error screen, I thought it would be amusing to simply display a special model, just for this situation. Thus: nosuchmodel.nlogo HOW DOES IT WORK? ----------------- The scrolling message is started automatically using the "startup" procedure. The startup procedure, if it exists, is always run when a NetLogo model loads. @#$#@#$#@ default true 0 Polygon -7500403 true true 150 5 40 250 150 205 260 250 blank false 0 @#$#@#$#@ NetLogo 3.0.2 @#$#@#$#@ @#$#@#$#@ @#$#@#$#@ @#$#@#$#@