[Fresco-devel] Re: Kit switching (was: Re: A Graphic Dictionary)
Stefan Seefeld <[email protected]>
| Newsgroups | gmane.comp.video.fresco.devel |
|---|---|
| Message-ID | <[email protected]> |
Hi Tobias, please don't post to the list *and* to me, as it happens I'm subscribed to the list ;-) Tobias Hunger wrote: > Lets take a step back: What do we need to allow for runtime switching of Kits? > We need views onto the SceneGraph at different 'levels' of abstraction (~= > Kits?). We need a place to store those views and finally we need to integrate > that in the Kits without too many changes if possible.Finally the system > needs to be adaptable to an arbitrary number of Kits that the user might have > installed and might want to switch the implementations of. well, please take another step back or three. What do you really want here ? Let me assume that you want to replace a given WidgetKit with style=Motif by a WidgetKit with style=Tobias. The effect should be the same as if you constructed your client GUI with that new WidgetKit right from the start. Thus you have to remember what calls you had to make to the WidgetKit, incl. what arguments you passed, and what you did with the returned scene graph chunks. Fair enough. I think this is an interesting question, but I definitely do *not* think that you can tackle that with graphic dictionaries. Please let's discuss this (with a much better understanding of the problem domain, use cases, etc.) in a separate thread. > Once a dictionary is integrated into the kits for debugging purposes, it might > be a good place to start and extend:-) May be. May be not. In any case I think it is wrong to think about it right now. It's much more efficient to think about what this dictionary as a means for debugging needs to be useful, and get this done. >>well, I can see your idea. But in practice this isn't really robust. First >>you'd need to use thread safe data, or at least use a dictionary per >>ServerContext to get meaningful results. Second don't forget that graphics >>are flyweights. They may be used in unexpected places, not necessarily >>related to your 'creator stack'. > > > I fail to see the point about having one dictionary per ServerContext: We do > want a consistent user experience, so if a application uses the same Kit as > another one and the user decides to switch the implementation of said kit, > then all the widgets created with the old one should change. No, I'd prefer to restrict the discussion to the debugging thread... If I understood correctly, you provide a global dictionary that holds a single creator stack. But different clients may create their UIs in parallel, using different instances of the kits, in general one WidgetKit per client (and thus ServerContext) etc. Thus, as a minimum, you should restrict your stack to be relative to a client. But even that may not be enough. The rigorous approach would really use one stack per thread (with TSS). > The dictionary > should be reasonably threadsafe, using one creatorstack per thread. That's > somewhat similar to the Tracer in Prague. Definitly enough for debugging > purposes... ok, that would (implicitely) solve the problem I described. Regards, Stefan