sketch-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Plugin-Problem


From: Bernhard Herzog
Subject: Re: Plugin-Problem
Date: 26 Oct 2002 18:41:06 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) Emacs/21.2

Antoon Pardon <address@hidden> writes:

> I recently installed 0.6.14 from the sources.
> 
> When I'm working on my CGM-filters it seems that
> the CGMsaver it uses, is the one I'm working on
> but the CGMloader it uses is the one that came
> with sketch.
> 
> I have added the directory where I keep the
> version I work on to the pluginpath but
> both the CGMsaver as the CGMloader are present
> their. So I don't understand why he uses the
> old version when loading and the new version when
> saving.

You added the new directory at the end of the plugin_path, right? I
think what's happening is probably the following:

On startup Sketch searches for plugins in the directories on the
plugin_path. For each kind of plugin Sketch maintains both a list and a
dictionary (the dict maps e.g. format names to plugins). When the
information about a plugin is read it's appended to the list and
inserted into the dictionary.

When Sketch loads a file it tests all plugins in the list of import
filters and uses the first whose magic regexp matches the file. That
means plugins which are read first (because their directory comes early
in the path) override the ones read later.

When saving, OTOH, Sketch basically just makes a lookup in the
dictionary. Here plugins read later override ones read earlier if both
use the same format_name.

As a workaround you could insert your directory twice, once at the
beginning and once at the end.

This is definitely not a very consistent way of handling collisions
between plugins and ought to be fixed at least in 0.7.x.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
MapIt!                                           http://www.mapit.de/




reply via email to

[Prev in Thread] Current Thread [Next in Thread]