Re: *UserData Suggestion



Hello Lars

Thanks for answering my post. Just one thing

This will simplify the User Interface and the operations of getting and setting properties. In fact get and set operations will somewhat be taken care by the datalist. Interfacing the properties of each object with Python will also be easier this way.


Don't know the dataset/datalist functionality well enough to determine
what it can do us.

The idea is to have an array that maps keys to values. The Glib dataset advances this slightly by providing arrays that can map between keys and memory 
offsets. To put it in STL terms, this would be a map<char *,char *> for the properties. I am using the STL functionality here just to illustrate the 
point. With a map like this one you can do Properties["colour"]="Red"; To access a property you can just do 
MyVariable=Properties["colour"]; If the key exists in the array you can read and modify its value, if it doesn't it gets added by the code that 
implements map. So, once you have something like that you can then "hang it" below *Userdata and let someone add whatever properties they 
want....Since we do not have the STL functionality in this codebase, i think that the closest thing is Glibs dataset or datalist...


All the best
thanOS





[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]