[Thuban-devel] Re: RfD: Support for layer specific resources

Bernhard Herzog bh at intevation.de
Thu Sep 2 14:34:25 CEST 2004


Martin Schulze <joey at infodrom.org> writes:

>> >> > And for Thuban.UI.classifier:
>> >> >
>> >> > add_properties_dialog(Layer, Classifier)
>> >> > add_properties_dialog(RasterLayer, Classifier)
>> >
>> > I'm not sure how I am supposed to implement this since
>> > classifier.py doesn't import mainwindow and I don't know if it
>> > would be a good idea to do so.
>> 
>> You could put that code into Thuban.UI.mainwindow which already depends
>> on Thuban.UI.classifier because it currently refers to the dialogs in
>> there directly.  That would keep the module dependencies the same as
>> now.
>
> Err???

Now it's me going Err :)

>  Are you really sure you want this code appear in mainwindow.py?

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
was what I was replying to.  classifier does not depend on mainwindow
but would if you put the add_properties_dialog call there.  That's how I
understood your reply anyway.  My suggestion, then, was that, since
mainwindow currently depends on classifier, you could have the call in
mainwindow and the depencies wouldn't change.  FWIW, I don't see why
putting the call into classifier would be a problem.

Note: mainwindow is always the module Thuban.UI.mainwindow here, in case
that wasn't clear from context which is sometimes hard to tell in
conversations stretching over months :)

> Similar code is required for other layers, too (e.g. currently WMS
> layers).  Should that code go into mainwindow as well?

For layers in extensions definitely not.

   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)