Open PragTob opened 10 years ago
Yeah, since the instance creation for the slide happens in Wingtips::Presentation
, that kind of hampers subclasses from doing anything interesting.
I don't typically like type checks, but would this be a case where Wingtips::Presentation
should check whether it's been handed a class or not, and only instantiate when it gets a class? Wingtips::Slide
could expose an app=
that gets called alternatively if you put an instance into the slides list.
I can think of a few other hackier ways to slice it, but that seems the simplest and clearest to me.
Right now I do not know of a way to make templates happen in the class style, i.e. what I'd like is:
I tried it out shortly, problem is that the initialize of Slide has to get handed an
app
. I solved a similar problem once through introducing aniniitialize_data
hook that gets called, however then people have to overwrite that, notinitialize
which is slightly odd. However, better than by force trying to makeinitialize
work.