RE: [AD] update/properties

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


> Ok, returning a new datafile makes sense, as well as 
> providing a helper to 
> construct the object (I think I'll change the name of the routine to 
> datedit_construct_datafile or something like that). But I 
> don't like the 
> 'prev' datafile very much: we don't need to pass a previous 
> datafile, only 
> the properties we want the new one to use.
> 
> Is this good enough for you? If so, I'll make the 
> modifications when merging 
> the patch.

I'm not sure. I can certainly imagine a use for the actual data.
I actually began implementing it passing only properties, then I
undid it and passed the whole object.
As a trite example, the file might be updated, but the datafile
representation might not have to be changed. Say, you want to get
a palette from a PCX file and apply non trivial transformations
to it: if you modify the image data but not the palette, you do
not need to redo all these computations, but only if you have the
original object for comparison. Besides, it's const. I'd keep it,
personally.
(OK, my example is trite, feel free to imagine a better one :))

> Yes, this is certainly problematic. On the other end, passing 
> 'depth' to an 
> audio plugin clearly makes no sense so we should devise a solution.

Maybe we could pass it as the geometry then. I don't think it would
cause problems, even if it wasn't a property before. Can you see any
that could arise ?

-- 
Vincent Penquerc'h 




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