Hello,
I am teaching myself how to program in B4A, so I thought that I would work through Erel's videos. Watched/listened pretty carefully through the first 3 (Code Flow, Subs and Variables, Strings). On the fourth one, there were some things that I didn't understand well (about Lists, mostly, and variable scope), so I thought I'd type in the code, try changing some things, hopefully figure out it worked. So I typed in the code that Erel had on his screen, and tried to build it.
I am running with an emulator, not an actual device. I have had great trouble getting it run on my phone, but I think that is due to issues with my phone. So, I'm using an emulator for now.
First problem was the compiler complained about no 'Sub Globals' section. So I added an empty 'Sub Globals/End Sub' section, and that problem went away. But why did I need it, and Erel did not?
Then I got this:
java.io.FileNotFoundException: /data/user/0/b4a.MyFirstProgram/files/virtual_assets/main2.bal (No such file or directory)
'MyFirstProgram' is left over from when I did the calculator exercise in the, I think, Getting Started booklet. Why is it looking for that? I started a new file for this new exercise, saved it to a new directory, where a proj-name.b4a file showed up, as expected. Why is it looking for something that I thought would have nothing to do with one?
Other (perhaps) random questions:
1) how does the compiler know to start execution with the AppStart Sub? Or does it start somewhere else that calls AppStart?
2) I have a 'Starter' tab by default that Erel doesn't have on his screen. Do I need it? If so, what is it for? If I don't need it, does clicking on the 'X' on the tab remove it from the project? Or do I need to use the menu selection: 'Project / Remove Module'?
3) what makes something a "non-UI/server app", as the comment at the top of the file indicates that it is? Just because I didn't run the Designer and make a UI?
My apologies if these are annoying newbie questions, but I don't know how else to make progress, and I didn't find anything in the forums when I searched for stuff like this, or in the Booklets (please let me know if I overlooked something). And I'm sure that there will be more as I work though things, my apologies in advance.
Thanks much for the help,
Jeff
I am teaching myself how to program in B4A, so I thought that I would work through Erel's videos. Watched/listened pretty carefully through the first 3 (Code Flow, Subs and Variables, Strings). On the fourth one, there were some things that I didn't understand well (about Lists, mostly, and variable scope), so I thought I'd type in the code, try changing some things, hopefully figure out it worked. So I typed in the code that Erel had on his screen, and tried to build it.
I am running with an emulator, not an actual device. I have had great trouble getting it run on my phone, but I think that is due to issues with my phone. So, I'm using an emulator for now.
First problem was the compiler complained about no 'Sub Globals' section. So I added an empty 'Sub Globals/End Sub' section, and that problem went away. But why did I need it, and Erel did not?
Then I got this:
java.io.FileNotFoundException: /data/user/0/b4a.MyFirstProgram/files/virtual_assets/main2.bal (No such file or directory)
'MyFirstProgram' is left over from when I did the calculator exercise in the, I think, Getting Started booklet. Why is it looking for that? I started a new file for this new exercise, saved it to a new directory, where a proj-name.b4a file showed up, as expected. Why is it looking for something that I thought would have nothing to do with one?
Other (perhaps) random questions:
1) how does the compiler know to start execution with the AppStart Sub? Or does it start somewhere else that calls AppStart?
2) I have a 'Starter' tab by default that Erel doesn't have on his screen. Do I need it? If so, what is it for? If I don't need it, does clicking on the 'X' on the tab remove it from the project? Or do I need to use the menu selection: 'Project / Remove Module'?
3) what makes something a "non-UI/server app", as the comment at the top of the file indicates that it is? Just because I didn't run the Designer and make a UI?
My apologies if these are annoying newbie questions, but I don't know how else to make progress, and I didn't find anything in the forums when I searched for stuff like this, or in the Booklets (please let me know if I overlooked something). And I'm sure that there will be more as I work though things, my apologies in advance.
Thanks much for the help,
Jeff