[Thuban-devel] Re: RfD: Support for layer specific resources
Martin Schulze
joey at infodrom.org
Wed Sep 29 21:08:39 CEST 2004
Moin!
Bernhard Herzog wrote:
> > 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.
Exactly.
> [...]
> > 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.
Ok. That works. It's basically a two-line module, but... well... it
works at least and is a more or less clean design.
> 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.
Having it in mainwindow doesn't work since that would introduce a
circular import chain. mainwindow is already importing the classifier,
so the classifier cannot import the mainwindow. Hence, this needs to
be dragged out into a different module.
> 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.
Thanks.
I'm attaching the solution in a patch to this mail, in case you or
anybody else still wants to comment on it. If not, I'll commit it
on Friday.
Regards,
Joey
--
The MS-DOS filesystem is nice for removable media. -- H. Peter Anvin
More information about the Thuban-devel
mailing list
This site is hosted by Intevation GmbH (Datenschutzerklärung und Impressum | Privacy Policy and Imprint)