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

Re: [zzdev] Re: [zzdev] Errors and exceptions



Tuomas Lukka wrote:
> > I agree with the classes you mention, but we also need a SyntaxError or
> > similar kind of thing for malformed structures: the program expects some
> > ZZ structure, but gets something else. This should probably be an error,
> > because it usually needs to be handled by the user somehow, not the
> > calling function.
> 
> Or alternatively

-- ? --

> By the way: what does Renderable.translate do? Is it necessary in Core
> or can we handle it through FlobSets somehow? I really don't like having
> it at that level, especially with the "returns false if .. not supported".

I don't think renderables should be there at all. The current interface
for decorations is holding us back. I'm not sure yet how we can improve
on it, but fixing it at this point seems to be totally unreasonable.

The problem is that connections need to be shown between two windows,
and in two halves, and directly behind the corresponding vobs (i.e. "0.5
depth levels behind"), or even between the vob's background and the
vob's contents/frame.

I'm getting the feeling that there should be a Decoration (or something
like that) class which saves the parameters in arrays, much like current
decorations do, but ranging over different depths, having depth-sorting
done on the arrays, and having its arrays staggered together with those
in the VobSet itself. However, that doesn't automatically help with
multiple windows. Well, probably the Decoration.render()s should always
be called with the top-level Graphics object, thus having to do
conversion. But we still need one Decoration object per
SceneFlob/FlobSet combination: not nice, as it makes the code placing
the decorations/connections more complex.

But to answer your question, translate() is outdated now that we have
SceneFlobs (which need to be improved, but still).

- Benja