How to link turing programs?
Author |
Message |
rikku007
|
Posted: Mon May 14, 2007 9:33 am Post subject: How to link turing programs? |
|
|
I have a program that consists of a menu and different pages, I was wondering if there is any way to link the pages to the menu so that when the user clicks the button in the menu screen, the program automatically goes to that corresponding screen. If anybody knows the code, it is appreciated if you can show us.
Thanks. |
|
|
|
|
|
Sponsor Sponsor
|
|
|
Clayton
|
Posted: Mon May 14, 2007 9:41 am Post subject: RE:How to link turing programs? |
|
|
The best way to do what you want to do is use a procedure for each page that you have (preferrably with a main generic procedure to control each page) and use mutual recursion to go back and forth from procedure to procedure. These topics (should) both be covered in the Procedures and Functions tutorial in the Turing Walkthrough. |
|
|
|
|
|
rollerdude
|
Posted: Mon May 14, 2007 10:09 am Post subject: Re: How to link turing programs? |
|
|
i had thought you meant linking programs, as in have a separate program for each page?
if so, you'd need somthing like
code: |
import page1.t,page2.t %ect
%or include, i'm not entirely sure which to use
|
in which case, each page has to be a unit
im sorry if this is not what you had in mind, but this what i thot you meant by your title |
|
|
|
|
|
Clayton
|
Posted: Mon May 14, 2007 10:26 am Post subject: RE:How to link turing programs? |
|
|
*sigh*
import is used to allow access to Turing Unit Files for use by programmers. This is usually used for importing classes and modules into the program.
include takes a .t source file, and basically copies and pastes the code from that file into your program (in essence). They are two completely different things. |
|
|
|
|
|
|
|