\ io \ \ io_pdur_dlog \ gui component of io that when user tries to set a long performance duration. \ \ \ note: this is the only component to include anything approaching an AI or \ "expert system" design. Just try setting up a long performance ;-) \ \ \ see the file io_screen for the use of this component. \ \ see the file io_top for more information on io itself. \ \ \ constructor: Han-earl Park \ copyright 2008 buster & friends' C-ALTO Labs \ \ www.busterandfriends.com/io \ \ (Edinburgh, November 1996 - \ (London, August 1997 - \ (Den Haag, October 1997 - \ (Valencia, March 1999 - \ (Southampton, May 2000 - \ (Cork, April 2006 - \ \ (Cork, October 2008 - \ \ REV: 0.0.1 alpha (Southampton, October 2000) \ REV: 0.0.1 beta (Southampton, November 2000) \ REV: 0.0.1 alpha++ (Southampton, July 2004) \ REV: 0.0.1 beta++ (Cork, May 2010) \ \ \ REV: 0.0.1 alpha * Unused * -- was part of io_screen. \ REV: 0.0.1 beta * Unused * -- was part of io_screen. \ MOD: HeP 05-19-04 Split off from io_screen. For previous history of this \ code see io_screen. \ REV: 0.0.1 a ++ __________________________________________________________ \ REV: 0.0.1 b ++ __________________________________________________________ \ Version for performance at Blackrock Castle Observatory, \ Cork, Ireland, May 25, 2010. anew task-io_pdur_dlog \ dialog when pdur = 60 minutes $rom $60m_a ," 1000110 1010101 1000011 1001011 0100001" ," 1101010 1100101 1110011 1110101 1110011 0100001" ," #@$&**!?!" ," &^%$*$! *%*@&*?!?" ," Pardon?" ," Excuse me?" 6 constant #60m_a $rom $60m_b ," No, sorry, I think you may find that a little on the long side." ," IÕm sorry, but I canÕt possibly allow you to do that." ," Allow me to recommend somthing shorter." ," I still believe that thereÕs a lot to be said for finite length pieces." ," Jeez! ThatÕs way, way, way, waaaaaaaaay too long." ," Music is the best, but life is shortÉ" ," People do need to relieve their bladder at some point you know." 7 constant #60m_b $rom $60m_c ," Just tell me that was a mistake, and we can both feel better about it." ," Okay. All forgiven. Just donÕt do it again." 2 constant #60m_c : 60M.DIALOG ( -- , alert user that pdur cannot be that long ) 128 choose IF 64 choose 0= IF #60m_a choose $60m_a dialog.a THEN \ #60m_b 1+ choose choose $60m_b dialog.a \ 16 choose 0= IF #60m_c choose $60m_c dialog.a THEN ELSE " Okay, okay. I give in. LetÕs do a really long and boring performance..." dialog.a " Fooled you!" dialog.a THEN \ update.screen ; \ when pdur is on the long side $rom $pdur_a ," Are you sure you want such a long performance duration?" ," Do you really intend to have such a long performance?" ," ThatÕs one long performance. Are you sure you want such a long performance duration?" ," You are about to set a very long performance duration. Should I accept this?" ," Pardon me, but did you mean to set such a long performance duration?" 4 constant #pdur_a $rom $pdur_b ," Are you just setting up for a rehearsal or something?" ," IÕm sorry, is this a sound check? A general equipment test?" ," Are you, perhaps, about to test out the software?" 3 constant #pdur_b $rom $pdur_c ," Allow me to remind you that this isnÕt supposed to be an installation work." ," Let me just add that I perform better when the time scales are smaller." 2 constant #pdur_c $rom $pdur_d ," Please, try not to bore the audience." ," Please, do not bore the audience." ," Try not to make this too boring." 3 constant #pdur_d $rom $pdur_e ," I hope you know what youÕre doing. You just canÕt take the audience for granted." ," Take it from me, a bored audience is an ugly audience." 2 constant #pdur_e $rom $pdur_f ," I mean it." ," I hope for your sake that you know what you are doing." ," I mean, do you have a good reason for inflicting this on people? Never mind, donÕt answer that." 2 constant #pdur_f : PDUR.DIALOG ( -- flag , true if accepted ) #pdur_a choose $pdur_a dialog.a/b IF 3 choose IF true \ -- flag ELSE #pdur_b choose $pdur_b dialog.a/b IF true ELSE 2 choose IF #pdur_c choose $pdur_c dialog.a THEN \ 3 choose IF #pdur_d choose $pdur_d ELSE #pdur_e choose $pdur_e 2 choose IF dialog.a \ #pdur_f choose $pdur_f THEN THEN dialog.a \ true \ -- flag THEN THEN ELSE false \ -- flag , restore old value THEN \ update.screen ;