• Bug

    From Tommyknocker@VERT/TALAMASC to All on Sun Jan 3 03:39:00 1999
    ã Ok here is the top portion of the code I am having trouble with.ãThis is the main menu and web listings menu for websites. ãã The problem is this. Hitting a key that is not listed as a command key justãreprints the menu, and does nothing else. This works perfectly on both menus,ãexcept hitting 'n'. If I hit n, the first time it prints the statement about aãwrong key, then gives the hit a key pause. At this point if you hit n again, itãwill then print the command prompt, but not the menu.ãã The same thing happens if for example you hit a q which is an invalidãkey. It will print the wrong key statement and pause. If you hit any key exceptãn it will clear the screen and reprint the menu and prompt just like it should.ãIf you hit an n it clears the screen and reprints just the prompt.ãã To see this bug in action logon to The Talamasca ã talamasc.madnet.netã and run Internet Resource Listing from the main menu.ããHere is the code...ããã!INCLUDE SBBSDEFS.INCã!INCLUDE FILE_IO.INCãã##### Set Node actionãnode_action node_xtrnãasyncãã############################ Display Main Menu ###############################ã:mainãcmd_homeãclsããcompare_user_misc um_ansiã if_trueã printfile "%jbajamods\\websites\\main.ans"ã elseã printfile "%jbajamods\\websites\\main.asc"ã end_ifãã##### Display Main Prompt #####ããprint "\r\nSelect an option @ALIAS@-->"ãã##### Get Command Key #####ããcompare_user_misc um_coldkeysã if_falseã getkeyeã elseã getstrupr 60ã end_ifãã##### Do nothing for control keys and space #####ããcmdkey ^@ã end_cmdãcmdkey ^Mã end_cmdãcmdkey ^Sã end_cmdãcmdkey "ã end_cmdããcompare_user_misc um_coldkeysã if_trueã crlfã end_ifã pause_resetãã##### Main Menu Commands #####ããcmdkey aã call add ã end_cmdããcmdkey eã call email ã end_cmdããcmdkey fã call ftp ã end_cmdã ãcmdkey rã returnã end_cmdããcmdkey tã call telnetã end_cmdããcmdkey wã call web ã end_cmdããprint "Excuse me, try a key that works!\r\n"ãcrlfãpauseãend_cmdãã############################ Display Web Menu ################################ã:webãcmd_homeãasyncãclsããcompare_user_misc um_ansiã if_trueã printfile "%jbajamods\\websites\\web.ans"ã elseã printfile "%jbajamods\\websites\\web.asc"ã end_ifãã##### Display Web Prompt #####ããprint "\r\nSelect an option @ALIAS@-->"ãã##### Get Command Key #####ããcompare_user_misc um_coldkeysã if_falseã getkeyeã elseã getstrupr 60ã end_ifãã##### Do nothing for control keys and space #####ããcmdkey ^@ã end_cmdãcmdkey ^Mã end_cmdãcmdkey ^Sã end_cmdãcmdkey "ã end_cmdããcompare_user_misc um_coldkeysã if_trueã crlfã end_ifã pause_resetããcmdkey dã call udeletewebã end_cmdããcmdkey rã cmd_popã returnã end_cmdããcmdkey sã call searchwebã end_cmdããcmdkey uã call updatewebã end_cmdããcmdkey vã call webfileã end_cmdããprint "Have you thought about getting some new fingers?\r\n"ãcrlfãpauseãend_cmdããend of code posted, but not the end of the module.ãã TommyKnockerãããããã---ã þ Synchronet þ telnet://talamasca-bbs.com http://www.talamasca-bbs.comã
  • From Tommyknocker@VERT/TALAMASC to Tommyknocker on Sun Jan 3 14:17:00 1999
    RE: BugãBY: Tommyknocker to All on Sun Jan 03 1999 11:39 amãã > Ok here is the top portion of the code I am having trouble with.ã > This is the main menu and web listings menu for websites. ã > The problem is this. Hitting a key that is not listed as a command key juã > reprints the menu, and does nothing else. This works perfectly on both menusãã The problem has been fixed. A little phone time with U. CrazyãDiamond put me on the right track. All I needed was to trap the built inãcontrol-c.ãã For the record, I think this is the final bug in my Internet ResourceãListing. I am going to spend a little time cleaning up and commenting the code,ãand then I will release it for you all to poke holes in.ãã Thank you very much UCD. You code snippet did not work, but it put meãon the right track.ã clear_abortã was the command we was needing. Works perfect now, and a bugãthat bugged me for 3 or 4 months is now history.ã °°±±²²ÑímmæKní€kîr²²±±°°ããã---ã þ Synchronet þ telnet://talamasca-bbs.com http://www.talamasca-bbs.comã