Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Path: utzoo!mnetor!uunet!husc6!bloom-beacon!gatech!udel!burdvax!sdcrdcf!randvax!florman From: florman@randvax.UUCP (Bruce Florman) Newsgroups: comp.sys.mac Subject: Re: MPW2.0 bug/feature Message-ID: <1149@randvax.UUCP> Date: Thu, 1-Oct-87 15:21:40 EDT Article-I.D.: randvax.1149 Posted: Thu Oct 1 15:21:40 1987 Date-Received: Tue, 6-Oct-87 04:57:43 EDT References: <2953@crcge1.UUCP> Organization: Rand Corp., Santa Monica Lines: 36 > I have stumbled on an annoying bug or feature of MPW2.0 . When you create a > menu item containing a multi-line command (eg. If), the Suspend/Resume > scripts do not work properly. Suspend saves the user menu items by calling > AddMenu without parameters. AddMenu writes the menu rebuilding commands with > hard quotes (') around everything for security. With an If command, this gives > something like: > AddMenu 'MenuName' 'MenuItem' 'If condition > commands > end' > with no deltas at ends of lines (actually deltas wouldn't help). Of course, > this command with a hard-quoted string spread on several lines is not syntac- > tically correct. > In fact, the only way I have found to write such commands is to use "-quotes > and to put deltas in front of all special characters. AddMenu is not smart > enough to recreate that. Try creating the menu item like this: Addmenu MenuName ItemName 'If condition ; command ; end' The semicolons are equivalent to EOLs. When AddMenu writes the item out to the SuspendState file, it will look like: Addmenu MenuName ItemName 'If condition ; command ; end' This is syntactically correct. -- ======================================================================== florman@rand-unix.ARPA {decvax,sdcrdcf,trwrb,trwspf,vortex}!rand-unix!gnu!florman "There is no limit to the amount of good that people can accomplish, if they don't care who gets the credit." - Anonymous