Hi,
I am old school, started programming with toggle switches and graduated to paper tape. My wife hated the smell of the oiled paper tapes. I had one I used a lot: Subtract Double Byte (SBDB), you say paper tape, she says SBDB. Nothing worse than dropping a box of cards on the way to submit them for running - even if they were numbered (yeah, you had to do that manually).
So, yeah, C++ was a godsend from my viewpoint.
LiveCode is new to me. My interest in it comes from a need to create a cross platform desktop application.
One issue I thought I saw in the discussion is lots of misunderstanding in the use of terms. I thought I saw too many assumptions of understanding of terms and then potential misunderstanding of the use of terms. Some of this misunderstanding is probably from my lack of experience with LiveCode.
Definitions from my point of view (C++ programmer);
Class - A definition of a thing that has named properties(fields), a blueprint. A Class has no visiblility to the user of the program. You can't do anything with a Class until you instantiate it as an Object. Neither the program, nor a user of the program can do anything with a Class until it is instantiated as an Object.
This is the biggest thing about "Class", it is a blueprint where everything has a name and that is how you "get" to it.
As an Object, now you can put values into the properties and operate on them. Each property has a type and only one type. The Class has functions (called methods) that can operate on the properties. Normally ONLY the Class's functions can access and manipulate its properties. Yes, a property can have a default value, but that is a detail.
Another way to look at a Class is that it is a Structure with functions attached to it.
In no way is a Class an Array.
Given the above, what is the closest abstract element of LiveCode that maps to Class?
Where does one store such abstract elements, whatever it is that maps to Class?
I just noticed on Jul 14, 2020 that a new post happened with the following link:
https://livecode.com/resources/guides/developers-guide/
The above link helps a lot, although does not answer all questions. I think my answers to the questions I posted are:
Given the above, what is the closest abstract element of LiveCode that maps to Class?
It seems that what LiveCode refers to as an "Object" is close to a Class.
An Object has named properties and code that is applied to those properties.
Confusing because when LiveCode says "Object", a C++ programmer thinks that is the instantiation of a Class.
Leads to new questions:
What is a Button? Is it an Object?
Is there such a thing as an "abstract customized Button" (call it absButton) that supplies the functionality for all the visible Buttons in all windows that you want to look and function the same way as defined in "absButton"?
Inheritance is sort of handled with the message passing hierarchy and the idea of Groups, but not really.
Still not certain how to create a Class that is not visible to the user?
(maybe make a bunch of Buttons, with the Visible property set to false?)
That just feels wrong.
Where does one store such abstract elements, whatever it is that maps to Class?
One thing that comes to mind.
If you have a database full of records. Each record's abstract concept can be represented by a Class and each record itself is an instantiation of that class. Depending upon the circumstances there are going to be fields in that record that are not going to be visible to the user and some that will never be.
How does one handle that?
Be wonderful if someone could provide clarity.
In the meantime I will continue on with the LiveCode Tutorials.
Thanks,
Andrew