ClassA defines a public method, MyPublicMethod. That method can be called from any code.
MyPublicMethod is public and as such available from anywhere.
ClassA defines a protect method, MyProtectedMethod. Code in ClassA or ClassB can call that method.
MyProtectedMethod is a Method with the scope “protected” and as such only avail. within it’s namespace (ClassA can of course access it and ClassB can access it via it’s namespace, like this: ClassA.MyProtectedMethod. If there was a ClassC it could also access it using ClassA.MyProtectedMethod
ClassA defines a private method, MyPrivateMethod. Only code in ClassA may call the method.
MyPrivateMethod is private and as such only available for ClassA.
there’s so many ways to achieve the same thing it would seem.
I’m just hoping for the simplest way to do this. A way that i can learn and repeat over and over again for all the windows/pages that will be on my app.
db = new SQLiteDatabase
db.DatabaseFile = new FolderItem("C:\Users\Burst01\Documents\SQLite\sqlite-dll-win64-x64-3410200\coatx.sqlite")
Catch e as DatabaseException
The app does normally run, so i’m assuming it has been connecting to the db fine before now
Is it a property of the “App” Object or the “Window” Object or a Module, Class, … ?
I’m pretty sure the Window2.InsertNewCustomer Method can’t reach the db Object. Because it’s no property of Window2 and it then it needs to know the “path” to the db Property.
This Item does not exist = The Item does not exist or it is not known within the current namespace. Type “Int32” has no member named “Connect” = In our case this happens because Xojo auto-casts (it assumes) db to an Int32 and an Int32 has no Connect Event or Property.