faqts : Computers : Programming : Languages : Tse : Menu

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

2 of 2 people (100%) answered Yes
Recently 2 of 2 people (100%) answered Yes

Entry

TSE: Menu: Create: Automatic: How to automatically create menu items in TSE?

Apr 17th, 2005 06:51
Knud van Eeden,


----------------------------------------------------------------------
--- Knud van Eeden --- 15 April 2005 - 03:13 pm ----------------------

TSE: Menu: Create: Automatic: How to automatically create menu items 
in TSE?

---

This idea is often used to automatically generate programs,
you just print your program statements, then compile these.

Creating a menu is thus just a special case of this idea.

---

Method: Printing of the new menu structure to file, then compiling this
        printed text with the TSE compiler

---

Steps: Overview:

 1. -Print the menu items

      e.g.

       AddLine( "MENU" + " " + "test" )
       ...
       AddLine( "END" )

 2. -Save your file

      e.g.

       SaveFile()

 3. -Compile this file

      in general:

       <tse compiler name> <your filename>

       ---

       e.g.

        sc32.exe myfilename.s

 4. -So alltogether you might get something like this
     (you possibly will have to fill in the full path to your TSE 
compiler
      sc32.exe and myfilename.s, or add this to your MSDOS PATH)

--- cut here: begin --------------------------------------------------

     PROC Main()
      EditFile( "myfilename.s" )
      AddLine( "MENU" + " " + "test" )
      AddLine( "END" )
      SaveFile()
      Dos( "sc32.exe" + " " + "myfilename.s" )
     END

--- cut here: end ----------------------------------------------------

 5. -The output of this macro will be a text file
     and a macro
     which could be INCLUDEd in your .UI file
     so dynamically generating a new menu.

---
---

Internet: see also:

---

TSE: Menu: Link: Overview: Can you give an overview of links?
http://www.faqts.com/knowledge_base/view.phtml/aid/35667/fid/1571

----------------------------------------------------------------------