Android Question create a new verison of your project

mikewebb

Member
Licensed User
Longtime User
i've reach a point in my project where i'm good. i'm getting ready to try some new things and i don't know if there going to work or not. so i want to create a copy of my project and work on this new copy. if everything works out i will contiue with the new copy but if i get myself into a mess i want to be able to jump back to the point i'm at right now. heres what i tried and failed. all of my project sits in a folder called doid2, so i made a copy of doid2 folder and renamed it doid3. then inside the doid3 folder i renamed doid2.b4a to doid3.b4a. then i opened doid3.b4a with the ide and right away i could see something was wrong, things that should have been blue were red. so i tried a compile and run and got the following error:
Parsing code. Error
Error parsing program.
Error description: The given key was not present in the dictionary.
Occurred on line: 73
Sub Public SendToBigBoy(AString As String)
did i do something wrong?? how am i supposed to create a new version ??
 

mikewebb

Member
Licensed User
Longtime User
HOLY TAKE OUT THE GARBAGE !! now my original version doesn't work ether, i think i might have broken my licence thingy. what do i do now. reinstall b4a ??
 
Upvote 0

Eric H

Active Member
Licensed User
Longtime User
This is what I do:

I create a folder called 'B4A Projects'. Inside this folder, I create 2 new folders for each project I am working on. So, if I am starting a project I want to call 'HelloWorld', I create a 'HelloWorld' folder inside the 'B4A Projects' folder, and this is where I save my HelloWorld.b4a project file. The second folder I create is also located in the 'B4A Projects' folder, and I call that one 'HelloWorld-zip'.

Inside the Project Attributes code region I would start out like this:
B4X:
#Region  Project Attributes 
    #ApplicationLabel: Hello World
    #VersionCode: 100
    #VersionName: v1.00
Once I have gotten my program to a point where it is working good, I save the project (File > Save), keeping the same project name (HelloWorld.b4a) and then I export my project as a zip file (File > Export As Zip). I save the zip file into my 'HelloWorld-zip' folder. The name I use for the zip file is a combination of the project name and the version number (HelloWorld v1.00.zip).

The zip folders contain all of your source code, files, etc. This means you can always revert to a specific version number by using the code in the zip file. Just change the version number in the Project Attributes code region (maybe VerisonCode 101 and VersionName v1.01) and save all the zip files into your '[ProjectName]-zip' folders and you can keep saving your source code (the b4a file, and other stuff) using the normal File>Save feature.

SO... you can mess around all you want without worrying you won't have your original to go back to. Just change the version number and save a zip snapshot each time you get some new code in your project that you are happy with.

Hope this helps,

Eric H
 
Upvote 0

Eric H

Active Member
Licensed User
Longtime User
Upvote 0

mikewebb

Member
Licensed User
Longtime User
export as zip. thats the key thing i think. don't just copy the folder like i did. thanks eric h. now i just got to figure out how to fix what i broke.
 
Upvote 0

mikewebb

Member
Licensed User
Longtime User
think i found the problem. i changed a line from Sub SendToBigBoy(AString As String) to Sub public SendToBigBoy(AString As String). i guess i changed it then without testing it i copy everything into a new folder and expected it to work. then when i went back to try the old verison it didn't work and i thought for sure the problem was with the key or with my version control system. anyway everythings working again, thanks for the help. i really hate being a newbie.
 
Upvote 0
Top