After testing the app, should i always revert to last save?

Got a LiveCode personal license? Are you a beginner, hobbyist or educator that's new to LiveCode? This forum is the place to go for help getting started. Welcome!

Moderators: FourthWorld, heatherlaine, Klaus, kevinmiller

Post Reply
et_phone_home
Posts: 13
Joined: Wed Jun 08, 2011 10:54 pm

After testing the app, should i always revert to last save?

Post by et_phone_home » Mon Jun 27, 2011 3:22 pm

Hi

I don't understand one little thing.

Ok, its cool that you can test the app without having to compile it, but if you test the app the objects can be all messed up on content and position. How can i go back the app to the way it was before tested?

Let me exemplify:

Imagine I'm creating a Snooker game and i wanna test the opening of the table (the first shot). So, at first all the ball are in the starting position, as they should be when the game starts. But, if i tests the game inside Livecode and give a shot on the balls, they will be all over the table. But its not how i wanna them to be. Have i always to revert to last saved game after i test my code? That's not very user friendly.

Before Livecode i used multimedia fusion 2. When i wanna test the game i just press play but it then compiles the code and opened another window with the game. So, i test the game, and after the test i just have to close the window and all the objects and all sort of variables remain the same. In livecode, you alter in real time and you always have to revert to last save after the testing. I find this very weird and stupid!

Maybe I'm doing something wrong. I wanna test the game in another window and not in real time

Klaus
Posts: 14177
Joined: Sat Apr 08, 2006 8:41 am
Contact:

Re: After testing the app, should i always revert to last save?

Post by Klaus » Mon Jun 27, 2011 3:51 pm

Hi,

1. well, that's the main difference between LiveCode and other dev environments:
Switching from "edit" mode to "runtime" mode is just switching the TOOL!
No extra windows or "compile" times, so this is a true WYSIWYG development :D

2. Create a handler that RESETS your game (put all balls into their starting prosition etc...)
Then you can execute this handler when the app starts (on preopenstack)!

And for your development, create a button that executes that script, so you can always
start over again with a mouseclick!

3. You said: "That's not very user friendly."
Get used to the fact that you are now the DEVELOPER!
And it is YOUR task to make your app user firendly for the END USER! 8)


Best

Klaus

jacque
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 7389
Joined: Sat Apr 08, 2006 8:31 pm
Contact:

Re: After testing the app, should i always revert to last save?

Post by jacque » Mon Jun 27, 2011 5:36 pm

In your final game, you will need some type of reset handler so that users can play more than one game in a session. That's something you'll need to write regardless, so you may as well write it first. Then while testing you can just call that handler and all your objects should go back into place. In fact, you should call that handler in a preOpenCard handler so that the game will always start up with correct positioning, even if you didn't save it that way.
Jacqueline Landman Gay | jacque at hyperactivesw dot com
HyperActive Software | http://www.hyperactivesw.com

et_phone_home
Posts: 13
Joined: Wed Jun 08, 2011 10:54 pm

Re: After testing the app, should i always revert to last save?

Post by et_phone_home » Mon Jun 27, 2011 8:37 pm

THX for replying:(

Post Reply