Trying out GLB; Question

Previous topic - Next topic

Glint

Ok, I'm using the GLBasic demo and fiddling around with some code and enjoying what I see. One thing about the IDE system though. If I modify some example programs and want to try a couple of lines of experimental code, when I complile with F5 the code is automatically saved. So if I don't want the code but load the program back later, the code is loaded with the (unwanted) changes. Have I got this right or is there some way to compile without saving ?


Quentin

as far as I know coding is ever saved when compiling. So if you want no change just create a new project and copy the coding from the examples. Although you'll find a copy of all samples under \GLBasic\Samples. During installation all samples should be copied in your project folder e.g. \GLBasic\Projects\GLBasic\Samples


Moru

#2
If you want version control, have a look at Subversion. I haven't tried it with GL-Basic but it should work with just about anything. It even keeps track of your images and other data you have in the project.

If this is too much work for you, just copy the file and rename it to todays date or whatever, save the file from GL-Basic again and you suddenly have a backup copy of the old program. I don't see a need for this in GL-Basic, I preffer to do it myself with already tested and proved working things. No need to reinvent the wheel is there? :-)

Glint

Thanks for the replies. I'm finding it a little irritating to copy and paste code or change the project etc. It's a shame as the ide is nice and compact and works for me. Just tonight I changed a couple of lines of code, it didn't work out as I wanted but I could'nt backtrack and was left with an unworkable program which I then had to comb  through to figure where I'd gone wrong. Surely just an extra option the Editor Prefs, something like a option/checkbox that reads "Save code when compiling?"  would be simple to implement ?
If not....well I'd better get used to it I guess   :whistle:

Moru

I'm guessing that the compiler is working from the actual file, not what is in memory and changing that is probably not as easy as you think. Just copy the .gbas file that you want to edit something in and if it doesn't work, just delete the new file and rename the backup to the original name.

Ian Price

Comments are your friends ;)

Just comment out lines with '//' and add in your new code. If it doesn't work as expected, the old code is still there. Not ideal, but it works perfectly.
I came. I saw. I played.

Moru

I'm not programming much GL-Basic at the moment so I'm not using subversion for the little tinkering. But when I do use subversion I only commit the changes when I'm done with something that works or when I'm taking a break, the rest of the time I'm just uploading and viewing. This is ofcourse PHP :-) I can't imagine any troubles with running subversion with GL-Basic though, just make a link on the desktop or wherever and press it now and then to commit. You don't need a backup of every single change you do, right?