Hey ggibson1
the tool looks very interesting for me, but i am just a beginner in costruct so i have a few questions:
did i understand it correctly that with the c2 data editor it is possible to use arrays like a database? i have some knowledge in mysql, and currently i am creating a game which simulates an economy. it its a real **** ** *** *** to do all this with arrays. the thing is, in my game new production facilitys get created all the time, each facility has its own recauces, needs to make orders and so on. just working with instance variables isnt enought here. so i need different arrays which i can handle like a mysql database...
- is this possible with this tool?
- are there any more examples or tutorials out there?
thank you
Joschi
Yes you can use the Arrays like a database with the C2 Data Editor. It comes with several methods built from C2 Function objects that implement different kinds of queries against the data in a C2 Array. These functions treat a C2 Array like a database Table. The names of these methods are meant be more user friendly rather than matching SQL standards.
There is a CAPX that comes with the C2 Data Editor that shows these methods being used. There is also extensive comments above each method. You can either copy these methods out of the CAPX or you can use the injection feature in the tool to inject these functions into an Eventsheet within your application.
You can do things like lookup a row in an Array (Table) by one column (e.g. ID) and return the value of a different column (e.g. DollarAmount) from that same matching row.
The names of the columns on the table results in Instance Variables on the C2 Array when it is injected into your application where each column name is assigned the index of the column in the table so that you can use the built in C2 intellisense to select which column to search on or return from the function by name.
I have worked with databases extensively over the past 25 years and so I made C2 Data Editor to make C2 feel as close as possible to that way of handling data for the same reasons you mentioned.