I have a long VB background (versions 1 through 6). Kudos by the way, B4J looks like a promising sucessor to VB. Here's hoping I can master it.
I'm trying to understand the first argument passed into AppStart.
1. What is B4J passing into AppStart as Form1? What is already on Form1? (like controls and such) Is this a blank Form object with nothing on it?
2. When invoking LoadLayout("B4JHowToAccesMSAcess") I don't understand what is already in that layout. When I invoke Designer I get a blank form, however, it's unclear to me if Designer is just opening without any particular context, or if it is opening B4JHowToMSAcess.fxml implicitly (something I didn't even notice was in the project until I discovered the File Manager button on the bottom right of the IDE.
3. It's not possible to even explicitly open an fxml file in designer so I'm very confused--is fxml a layout or isn't it? If it is, why can't I select it? Is it some kind of unspoken "default" that gets loaded into Designer?
Sorry if this is covered in some documentation already, but I've been trying to swallow everything at once and there doesn't seem to be a clear starting place for me. The documentation seems more like a dictionary/encyclopedic reference (understandable starting place for the model of the B4X product line), but I haven't yet found a functional "I know VB basics, talk me through the starting theory so I know where everything is in a project."
I understood how all the parts of a VB project fit together, but getting a grasp of B4J with different the terms is throwing me off. Examples:
Thanks to all the existing posters for great contributions and questions, especially @Erel.
I'm trying to understand the first argument passed into AppStart.
Sub AppStart (Form1 As Form, Args() As String)
MainForm = Form1
MainForm.RootPane.LoadLayout("B4JHowToMSAccess")
MainForm.Show
'
AppInit
'
If initDatabase = True Then
loadDatabase
End If
End Sub
MainForm = Form1
MainForm.RootPane.LoadLayout("B4JHowToMSAccess")
MainForm.Show
'
AppInit
'
If initDatabase = True Then
loadDatabase
End If
End Sub
1. What is B4J passing into AppStart as Form1? What is already on Form1? (like controls and such) Is this a blank Form object with nothing on it?
2. When invoking LoadLayout("B4JHowToAccesMSAcess") I don't understand what is already in that layout. When I invoke Designer I get a blank form, however, it's unclear to me if Designer is just opening without any particular context, or if it is opening B4JHowToMSAcess.fxml implicitly (something I didn't even notice was in the project until I discovered the File Manager button on the bottom right of the IDE.
3. It's not possible to even explicitly open an fxml file in designer so I'm very confused--is fxml a layout or isn't it? If it is, why can't I select it? Is it some kind of unspoken "default" that gets loaded into Designer?
Sorry if this is covered in some documentation already, but I've been trying to swallow everything at once and there doesn't seem to be a clear starting place for me. The documentation seems more like a dictionary/encyclopedic reference (understandable starting place for the model of the B4X product line), but I haven't yet found a functional "I know VB basics, talk me through the starting theory so I know where everything is in a project."
I understood how all the parts of a VB project fit together, but getting a grasp of B4J with different the terms is throwing me off. Examples:
- Maps remind me of perl hashes; until I realized that, those were a bit fuzzy to me
- I get that there are "classes" but I'm not ready to equate those to my understanding of VB classes yet
- I still don't have a clear understanding of when certain objects come into existence and what the order of events is
- I can't seem to find a clear description of an Activity (theory, anatomy, syntax, etc)
- I still need to separate forms vs layouts, I'm guessing layouts derive from B4J's java foundation
- The overall logic of the database example is something I'm still trying to understand; I'm DBUtils is something I won't need to touch, but I hope to develop an understanding of the logic I will need to encapsulate for each major object type in the database front end I want to write.
Thanks to all the existing posters for great contributions and questions, especially @Erel.