[Thuban-devel] Re: RfD: Support for layer specific resources
Bernhard Herzog
bh at intevation.de
Tue Sep 14 16:57:50 CEST 2004
Martin Schulze <joey at infodrom.org> writes:
> Bernhard Herzog wrote:
>> No, I'm not sure, and I don't have the time to find the perfect place
>> for it. You didn't want it in Thuban.UI.classifier, though, and that
>
> No, I wasn't sure how I am supposed to implement this in
> classifier.py.
Just as you would in the wms extension.
[...]
> Proposal:
>
> Add Thuban/UI/propdialgs.py (or any other name) with (as stated in
> the July 27th mail):
>
> a) the declaration of the global variable
>
> b) the global register function
>
> c) the access function to make it complete [optional]
>
> Since in practice only mainwindow needs to look up the mapping,
> this isn't required and can be done directly in mainwindow as
> well, but it would break the modular concept a bit.
>
> Would that be acceptable for you?
I'd at least omit the accessor functions in b) and c). It's fine to
call methods on the ClassMapper instance directly. The variable name of
the instance shouldn't start with _ then, though.
Introducing a new module which effectively contains only one object
seems wasteful. OTOH it is a bit more modular than putting it into the
mainwindow module, but then again, even that is much more modular than
what we have now. I'd probably just stick the ClassMapper instance into
mainwindow for now and create a new module if we really need it some
day. It wouldn't be hard to maintain a backwards compatible interface
for a while either.
However, I have spent practically 100% of my time on non-Thuban things
for the last several months and that won't change anytime soon. I don't
really have time to make up my mind about this or to keep discussing
this much longer. I'd say, you decide which way to go here and just
check that in. I'm sure you'll come up with a reasonable solution.
Bernhard
--
Intevation GmbH http://intevation.de/
Skencil http://sketch.sourceforge.net/
Thuban http://thuban.intevation.org/
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)