Programming C, C++, Java, PHP, Ruby, Turing, VB
Computer Science Canada 
Programming C, C++, Java, PHP, Ruby, Turing, VB  

Username:   Password: 
 RegisterRegister   
 Need Help Urgently on Turing project
Index -> Programming, Turing -> Turing Help
View previous topic Printable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic
Author Message
flyforfame




PostPosted: Sat Mar 28, 2009 8:55 pm   Post subject: Need Help Urgently on Turing project

here is a code that i got from button for dummies

code:

import GUI

setscreen("graphics:300;125")

procedure hello
locate(1,1)
put "Hello User, you have clicked Button #1!"
end hello

procedure hi
locate(1,1)
put "Hello User, you have clicked Button #2!!"
end hi

var button1:int:=GUI.CreateButton(25,25,0,"Button 1",hello)
var button2:int:=GUI.CreateButton(25,50,0,"button 2",hi)

loop
exit when GUI.ProcessEvent
end loop


this just stays on the same buttons over and over
how do i make is it so that when i click any of the buttons i can go to a second page so i can add a different question and different buttons etc
please reply asap this project is due very soon and i dont want to fail[/quote]
Sponsor
Sponsor
Sponsor
sponsor
TheGuardian001




PostPosted: Sat Mar 28, 2009 9:10 pm   Post subject: Re: Need Help Urgently on Turing project

First off, you should be writing your OWN code. not just stealing code snippets from tutorials.

Secondly, look up GUI.Hide and GUI.Show in the Turing help file. As you might have guessed, these hide and show GUI objects. Just hide buttons you don't need at the moment, and show ones you do.
Tony




PostPosted: Sat Mar 28, 2009 11:26 pm   Post subject: RE:Need Help Urgently on Turing project

The code demonstrates how you can get different buttons to call different procedures. Which is all that buttons ever do. That is enough to get you started.

The concept of "a page" is flawed. There are no multiple pages; it's always the same screen, the same program that is running. You could get different procedures to draw different things, but you really have to be thinking about the organization from a different perspective.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
flyforfame




PostPosted: Sun Mar 29, 2009 9:52 am   Post subject: Re: Need Help Urgently on Turing project

well i did copy and paste the code because it was exactly what i needed and also when i said "next page" what i mean is that if someone clicks button1 or button2 then it resets the screen and presents 2 new buttons eg button3 button4 and when they click one of those then goes to another eg button5 button6 i tried to read the Help page but i couldnt find anyhting relevent also google was no help either...
platky




PostPosted: Sun Mar 29, 2009 11:02 am   Post subject: RE:Need Help Urgently on Turing project

just exit the loop and enter a new loop
rawrawraw




PostPosted: Sun Mar 29, 2009 11:15 am   Post subject: RE:Need Help Urgently on Turing project

I'm having the same problem. I think it's because when you go to the next question, the button's from the last question are still there, its just that you cant see it because you used cls.
If there's a way to clear the whole thing, not just the screen, then that would solve the problem. Anyone have any solutions?
Tony




PostPosted: Sun Mar 29, 2009 2:00 pm   Post subject: Re: RE:Need Help Urgently on Turing project

rawrawraw @ Sun Mar 29, 2009 11:15 am wrote:
If there's a way to clear the whole thing, not just the screen, then that would solve the problem. Anyone have any solutions?

Yes, but such requires an ability to read the thread above.
TheGuardian001 @ Sat Mar 28, 2009 9:10 pm wrote:
Secondly, look up GUI.Hide and GUI.Show in the Turing help file. As you might have guessed, these hide and show GUI objects. Just hide buttons you don't need at the moment, and show ones you do.
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
rawrawraw




PostPosted: Sun Mar 29, 2009 2:50 pm   Post subject: RE:Need Help Urgently on Turing project

hide only hides the button. but you can still click the spot where its hidden and it's still there. i also tried dispose but doesn't work either.
Sponsor
Sponsor
Sponsor
sponsor
Tony




PostPosted: Sun Mar 29, 2009 2:55 pm   Post subject: RE:Need Help Urgently on Turing project

Have you even read the documentation or tried it out with code?
Latest from compsci.ca/blog: Tony's programming blog. DWITE - a programming contest.
Display posts from previous:   
   Index -> Programming, Turing -> Turing Help
View previous topic Tell A FriendPrintable versionDownload TopicSubscribe to this topicPrivate MessagesRefresh page View next topic

Page 1 of 1  [ 9 Posts ]
Jump to:   


Style:  
Search: