Computer Science Canada

Forward Procedure + GUI

Author:  SucreTeen123 [ Sun Jun 03, 2012 9:34 am ]
Post subject:  Forward Procedure + GUI

Okay so the problem that I'm having is that I am trying to put music in a gui music button in a body procedure. But whenever I put the music.playfile into a body procedure like:


body procedure Rihanna1
Music.PlayFile (Rihanna 1 - Love the Way You Lie.mp3)
end Rihanna1


the gui button works but I can't go back to the other page when I press the back button. I really don't understand why this is happening because I have tired using getch to go back to the next page and I tried making a gui back button but that just make my program more confusing. Please help.

Author:  Amarylis [ Sun Jun 03, 2012 10:58 am ]
Post subject:  RE:Forward Procedure + GUI

Why do you need to make it a forward procedure?

Author:  SucreTeen123 [ Sun Jun 03, 2012 1:31 pm ]
Post subject:  Re: Forward Procedure + GUI

I need to make a forward procedure because I have multiple procedures in my program and gui won't work unleess I have a forward procedure for some odd reason that I really don't understand. My teacher is the one who told me to use forward procedure if I am trying to add gui with music on a procedure.

Author:  Amarylis [ Sun Jun 03, 2012 5:14 pm ]
Post subject:  RE:Forward Procedure + GUI

GUI can work without forward procedures, just make sure to declare the procedure before you assign it as the actionProc on the widget you're using.

Author:  SucreTeen123 [ Sun Jun 03, 2012 6:28 pm ]
Post subject:  Re: Forward Procedure + GUI

okay so i tried and you're right I don't need forward prcedure but I still can't back to the other page when I press a button. When I put getch (rihanna) before the gui buttons it makes the gui buttons come out after, and when I put it after the gui draw buttons it just doesn't work.

Author:  Amarylis [ Sun Jun 03, 2012 9:24 pm ]
Post subject:  RE:Forward Procedure + GUI

I'm not entirely sure what you mean by this, I'd have to take a look at your code.

My best guess is, the procedure you've assigned to the "other page" button isn't doing what you think it's doing


: