New datafile features

Archive of the older Feature Request Forum Posts
Locked
User avatar
ncrsn
Grandmaster Poster
Posts: 255
Joined: Fri Feb 10, 2006 12:15 am

New datafile features

Post by ncrsn »

Couple of things that could be better.

1. Non-saved datafiles

Because of its nature, datafile is more practical datastore than, say, global property. When storing temporary stuff, it would be useful and more efficient save time wisely, if scripter could somehow set the datafile non-saveble. Like cprops can be, using #-prefix. This could, for example, be done with a new flag for CreateDataFile, DF_NOT_SAVED.

2. Integers as a element propnames

Right now only strings are valid "keys" for an element's properties. To make these more easily assessible, integers should be usable, too. Using CStr() before saving and CInt() after reading propnames is not too complex, but this feature would make the process easier -> making it a worth feature.

3. elemref.Delete() method

In order to delete element, for any reason, one has to know - not only the name of it, but also the datafile it belongs to. That means, if there's a function that sometimes erases properties from elements, and one likes to delete emptied elements, the function needs to have parameters for datafile (name/ref), element (name [ref isn't enough]), property (name) to be destroyed, aside all the other stuff. If there were elemref.Delete(), having datafile's name or reference and element's name wouldn't be required, which would clean up the code.


(That's all I can think of right now - don't hesitate to add your own suggestion or to comment existing ones)
Locked