Importing
Author |
Message |
iop
|
Posted: Thu May 20, 2004 2:41 pm Post subject: Importing |
|
|
I have an ISP to do, and for now, it's running pretty good. However I have a problem. For my ISP I have to do screen savers. Instead of making one big Turing file, I decided to make each screen saver its own Turing file. Now I am wondering how can I import all of the screen savor files into my main menu file?
Code for Menu (This is just something that I wrote quickly so that it would be easier for me to get help. If I need to post up my Screen saver Turing files, I will do that also)
Quote:
import GUI
var b1, b2, b3 : int
b1 := GUI.CreateButton (0, 0, 0, "Screen saver1", ss1)
b1 := GUI.CreateButton (100, 0, 0, "Screen saver1", ss2)
b1 := GUI.CreateButton (200, 0, 0, "quit", GUI.Quit)
loop
exit when GUI.ProcessEvent
end loop
|
|
|
|
|
|
Sponsor Sponsor
|
|
|
SuperGenius
|
Posted: Thu May 20, 2004 2:45 pm Post subject: (No subject) |
|
|
you could make a main program which would list the available screensavers and have an if-elsif structure that would 'include' one of them based on the user's input
|
|
|
|
|
|
iop
|
Posted: Thu May 20, 2004 2:57 pm Post subject: (No subject) |
|
|
I have tried it both ways, with making using GUI buttons, and as a if statement.
About attached files. ISP is with the if statement, ISP2 is with the GUI buttons
Description: |
|
Download |
Filename: |
ISP.T |
Filesize: |
5.13 KB |
Downloaded: |
222 Time(s) |
Description: |
|
Download |
Filename: |
ISP2.T |
Filesize: |
5.3 KB |
Downloaded: |
238 Time(s) |
|
|
|
|
|
|
SuperGenius
|
Posted: Thu May 20, 2004 3:00 pm Post subject: (No subject) |
|
|
your code for the first one has 13 errors. if you fix it up then i'll look at it.
|
|
|
|
|
|
iop
|
Posted: Thu May 20, 2004 3:04 pm Post subject: (No subject) |
|
|
It has 13 errors because I have Procs inside an If statement. I am trying to get that fixed. I'm also trying to figure out how to import correctly
|
|
|
|
|
|
iop
|
Posted: Thu May 20, 2004 4:29 pm Post subject: (No subject) |
|
|
How can I get something like this to work?
Quote: var choice : int
get choice
if choice = 1 then
import "mod1.t"
end if
or this
Quote: import GUI, ss1 in "mod1.t", ss2 in "mod2.t"
var b1, b2, b3 : int
b1 := GUI.CreateButton (0, 0, 0, "Screen saver1", ss1)
b1 := GUI.CreateButton (100, 0, 0, "Screen saver1", ss2)
b1 := GUI.CreateButton (200, 0, 0, "quit", GUI.Quit)
loop
exit when GUI.ProcessEvent
end loop
|
|
|
|
|
|
|
|