Normal Topic Testing code interactively (Read 3906 times)
Rick_R
Full Member
***
Offline



Posts: 243
Joined: Jan 29th, 2010
Testing code interactively
Feb 5th, 2011 at 11:07pm
Print Post Print Post  
Unlike most versions of BASIC, SBasic does not support an interactive mode.  An easy way to get around that is to put a command button on your form called Test Code.  To test code, in Commands select Program Layout, select the command button with the Elements dropdown, select Event: On Element Entry and put the code there.  You can test the syntax in the program editor.  Save the change, Preview the application, go to a record (if that needs to be done), and then press the command button.  Not 100% interactive test, but pretty close.
  
Back to top
 
IP Logged
 
The Cow
YaBB Administrator
*****
Offline



Posts: 2530
Joined: Nov 22nd, 2002
Re: Testing code interactively
Reply #1 - Feb 6th, 2011 at 4:35am
Print Post Print Post  
Actually, while developing, I've found it especially useful to use a single record mass update to test code interactively, avoiding the need to go in and out of runtime altogether. That way I can simply write the code, run it, make any changes, and repeat as necessary all in runtime. Then, once it is working to my specs, cut and paste it into the correct event, making whatever small changes are needed for the event model.
  

Mark Lasersohn&&Programmer&&Lantica Software, LLC
Back to top
IP Logged