RE: [AD] user data

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


Vincent Penquerc'h writes:
>> Maybe for BITMAPS, but DIALOG already has dp,dp2 and dp3.  
>> These are quite sufficient I find. 
>
> This would be valid only if one knew Allegro would *never* use 
> one of these for its own purposes, which is not true. You don't 
> want a widget to use your data field to store something. And you 
> don't want to find out that a newer version of Allegro does this 
> with a field it didn't use before. Thus the need for a field that 
> is specifically reserved to the user. 

But how do you define "the user"? Especially when addon packages
are providing additional widget types, there can easily be three
different people all fighting over the same fields (future versions
of Allegro, the addon author, and the client program itself).
The situation could be even worse if one addon package was built 
over the top of another!

The ultimate thing would be if there was some way for arbitrary
numbers of clients to attach their own data, accessing it by
a unique ID code through some sort of hash table structure. But
that has a performance hit of requiring people to look through a
table every time they want to access their data, rather than
being able to go straight to it at a fixed location. I'm not sure
if the flexibility is worth that kind of performance hit...


-- 
Shawn



Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/