[Bese-devel] Creating a UCW component?
Attila Lendvai
attila.lendvai at gmail.com
Tue Nov 21 17:56:39 UTC 2006
> And I'd like to be able to create a instance of the component "off-line", i.e. something like this:
>
> (make-instance 'my-component)
>
> However, this doesn't work and I get the error message:
i've got a single local patch that i considered not generally useful
and therefore did not push to the official repos, and it is exactly
this. it makes it possible to create components without a
context/session.
my usecase is components used as views. they are part of the component
structure that describe what should be rendered, but they are not
directly rendered themselves. (e.g. (render-poperty renderer view),
where view holds some :component slots, etc, but 'render will never be
called on it)
some of these views are :stateless t, iow singletons, used for mere
dispatch purposes and they are created at load-time.
i still don't think that this patch should be in the official repo in
it's current form, though. but i'll send it to you directly tomorrow
(it's only a one-liner unless around some part of the
initialize-instance of component) and after drewc's refactor is
slowing down we may find a better solution for this. (this may be also
ok, i just didn't invest the time to think through the consequences)
--
- attila
"- The truth is that I've been too considerate, and so became
unintentionally cruel...
- I understand.
- No, you don't understand! We don't speak the same language!"
(Ingmar Bergman - Smultronstället)
More information about the bese-devel
mailing list