[Gambas-user] Gambas2-Writing properties of classes to file.
Richard
richard.j.walker at ...247...
Thu Jun 10 22:02:08 CEST 2010
Greetings to the list on a fine warm sunny evening in Belfast,
But here I am, indoors, trying to find an "easy" way to make some data more
persistent.
In a small app I am writing for my brother I have a number of classes designed
to hold information about video and audio clips. Some of the data
is "expensive" to gather - it takes time to process MBytes-GBytes of video to
find out, for example, how many frames have been captured and how many
dropped.
In C I might have used an array of structures, or somesuch. In Gambas I have
implemented the data store as a collection of class instances.
I am trying to find a way to write the property names and values to a file and
I cannot seem to find anywhere in the documentation, or in my archive of this
list, a reference to the method used by the IDE when it prints a table to the
screen of a highlighted class instance name (in break mode of course).
The only practical alternative I can see at the moment is to write a long
procedure to write these names and values to a file but there is so much to
copy it is quite daunting, and likely to be typing-error-prone. Since in
debug mode Gambas already knows how to create tables of the data I want to
save, can I not discover this and do it the same way? Perhaps some of you
already know how. Here's Hoping!
Richard
More information about the User
mailing list