Path: utzoo!news-server.csri.toronto.edu!cs.utexas.edu!usc!wuarchive!waikato.ac.nz!comp.vuw.ac.nz!jwright From: Julian.Wright@comp.vuw.ac.nz (John Julian Wright) Newsgroups: comp.sys.acorn Subject: Re: MessageTrans (Menus) Message-ID: <1991Mar14.013807.5702@comp.vuw.ac.nz> Date: 14 Mar 91 01:38:07 GMT References: <+GG&9-$@warwick.ac.uk> <7114@ecs.soton.ac.uk> Sender: news@comp.vuw.ac.nz (News Admin) Organization: Computer Science, Victoria University, Wellington, NewZealand Lines: 44 Nntp-Posting-Host: pencarrow.comp.vuw.ac.nz Originator: jwright@pencarrow.comp.vuw.ac.nz In article <7114@ecs.soton.ac.uk> you write: |> I just read my menu item text in from the messages file, and settle for |> doing it like that. I have my own shorthand which I particularly like, |> and so I don't use the MessageTrans_MakeMenus SWI at all. |> |> (IDEA: If MessageTrans comes with the Printer Drivers, try looking at |> the !RunImage files in the printer drivers. ) I have looked inside the PrinterDM !RunImage, only to find that Acorn are doing exactly the same thing as you! I can not find any reference to MessageTrans_MakeMenus or it's decimal numeric equivalent with a LIST IF, so I assume it is not there. The menu is in fact read from the file like any other, and parsed by a BASIC function to produce the final menu block. I have always used quite a radically different method of creating menu blocks: use the assembler with EQUD statements for data values and labels to point to the various submenus. I have refined it somewhat by using macro assembly, such that I don't actually need to worry about EQUDs any more: eg .mainmenu FNmenu_start("Grapevine",menu_width%) FNmenu_item(&00,infow% ,&21,"Info") FNmenu_item(&00,def_menu,&21,"Defaults") FNmenu_item(&80,-1 ,&21,"Quit") .def_menu FNmenu_start("Defaults",72) FNmenu_item(&00,-1,&21,"Load") FNmenu_item(&80,-1,&21,"Save") It has the advantage that you need never worry about having to tick or untick an item, for example because a ticked item can de defined as: FNmenu_item(-reverse%,-1,&21,"Reverse Sort") and the tick will be set or cleared depending on the state of variable 'reverse%'. Unfortunately this technique doesn't work very well with compilers, which seem to have hernias over anything assembled :-( Cheers, Julian.