4GL Menu Question
Posted in 1997
This is a multi-part message in MIME format. --------------78E63C754458 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit John Cokos wrote: > > ------------6A3B00174F0 > Content-Transfer-Encoding: 7bit > Content-Type: text/plain; charset=us-ascii > > Is there a way to AUTOMATICALLY Activate a menu item in 4gl? > I would like to take NEXT OPTION one step further, by allowing the > user to, based on the result of some other input, skip to another menu > item > and have the code for that item execute automatically...... > ie > MENU "Test" > COMMAND "Item1" > CALL SomeFunction() RETURNING Flag > IF Flag = "Y" THEN > NEXT OPTION "Item 2" ## Highlight the item so > the user knows what he's doing > --> Do Code For Item 2 ## Execute the proper > code > END IF > COMMAND "Item 2" > ....... > END MENU > > Thanks > John Cokos > The first thing that comes to mind would be to encapsulate the code for the menu option you want to call in a function. The 4gl would be something like this: MENU "Example" COMMAND "Launch" "This command launches the receiver command" # do some stuff MESSAGE [or DISPLAY or ERROR or pop-up a WINDOW] "Executing receiver" NEXT OPTION Receiver CALL receiver_code() COMMAND "Receiver" "This command can be launched by Launch or run independantly" CALL receiver_code() ... Tim --------------78E63C754458 Content-Type: message/rfc822 Content-Transfer-Encoding: 7bit Content-Disposition: inline >Received: from bfmail.bigfoot.com by mail.sisna.com Sun Feb 02 05:03:21 1997 >Received: from rmy.rmy.emory.edu ([170.140.97.4]) by bfmail.bigfoot.com > (post.office MTA v2.0 0813 ID# 0-12698) with ESMTP id AAA175 > for <timhood@bigfoot.com>; Sun, 2 Feb 1997 07:10:27 -0500 >Received: (from ilist@localhost) by rmy.rmy.emory.edu (8.7.1/8.7.1) id HAA20744 for timhood@bigfoot.com; Sun, 2 Feb 1997 07:08:32 -0500 (EST) >From: John Cokos <jcokos@ix.netcom.com> >Message-Id: <32F4353D.6FAE@ix.netcom.com> >Subject: 4GL Menu Question >Date: Sun, 02 Feb 1997 01:33:33 -0500 >Reply-To: John Cokos <jcokos@ix.netcom.com> >Organization: Netcom >Sender: informix-list-owner@rmy.emory.edu >X-Informix-List-To: timhood@bigfoot.com >X-Informix-List-Id: <news.33311> ------------6A3B00174F0 Content-Transfer-Encoding: 7bit Content-Type: text/plain; charset=us-ascii Is there a way to AUTOMATICALLY Activate a menu item in 4gl? I would like to take NEXT OPTION one step further, by allowing the user to, based on the result of some other input, skip to another menu item and have the code for that item execute automatically...... ie MENU "Test" COMMAND "Item1" CALL SomeFunction() RETURNING Flag IF Flag = "Y" THEN NEXT OPTION "Item 2" ## Highlight the item so the user knows what he's doing --> Do Code For Item 2 ## Execute the proper code END IF COMMAND "Item 2" ....... END MENU Thanks John Cokos -- +-------------------------------------------------------+ _/_/_/_/_/_/_/ _/_/_/_/_/_/_/ _/_/_/_/_/_/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/_/_/_/_/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/ _/_/_/_/_/_/_/ _/_/_/_/_/_/_/_/ _/_/_/_/_/_/_/ Call Center Solutions...Database Management / Design List Brokerage Barcoding / Caging Services V:(609)546-0434 F:(609)310-0575 +-------------------------------------------------------+ ------------6A3B00174F0 Content-Transfer-Encoding: 7bit Content-Type: text/html; charset=us-ascii <HTML><BODY> <DT>Is there a way to AUTOMATICALLY Activate a menu item in 4gl?</DT> <DT>I would like to take NEXT OPTION one step further, by allowing the</DT> <DT>user to, based on the result of some other input, skip to another menu item</DT> <DT>and have the code for that item execute automatically......</DT> <DT> ie</DT> <DT> MENU "Test"</DT> <DT> COMMAND "Item1"</DT> <DT> CALL SomeFunction() RETURNING Flag</DT> <DT> IF Flag = "Y" THEN</DT> <DT> NEXT OPTION "Item 2" ## Highlight the item so the user knows what he's doing</DT> <DT> --> Do Code For Item 2 ## Execute the proper code</DT> <DT> END IF</DT> <DT> COMMAND "Item 2"</DT> <DT> ........</DT> <DT> END MENU</DT> <DT> </DT> <DT>Thanks</DT> <DT>John Cokos</DT> <DT><BR> -- <BR> +-------------------------------------------------------+<BR> <BR> _/_/_/_/_/_/_/ _/_/_/_/_/_/_/ _/_/_/_/_/_/_/<BR> _/_/ _/_/ _/_/<BR> _/_/ _/_/ _/_/_/_/_/_/_/<BR> _/_/ _/_/ _/_/<BR> _/_/ _/_/ _/_/<BR> _/_/_/_/_/_/_/ _/_/_/_/_/_/_/_/ _/_/_/_/_/_/_/<BR> <BR> Call Center Solut