Subject: [Thuban-list] simple tool

From: "Fidel Serrano" <[email-masked]>
Date: Mon, 15 Sep 2003 19:48:17 -0400 (EDT)

i want this simple tool to display the distance in a mesage box for
example, so my cuestion is how can i get the thuban context?, 
adding a new command to the registry is the only way?

______________________________________________________________
Sponsored By:

The ByRegion Network 
http://www.HealerPages.info

The Rumi Spirit Card
http://www.omplace.com/rumi

OmPlace - The Conscious Living Directory - FREE Email          
http://www.omplace.com

---

From: Bernhard Herzog <[email-masked]>
Date: Fri, 19 Sep 2003 13:04:05 +0200

> adding a new command to the registry is the only way?

The context as such is only used for the commands. Tools are activated
through commands as shown in the simple_tool.py example so getting hold
of the context shouldn't be a problem.

In the tool object itself you can use self.view if you need to access
the map window the tool is operating on. That self.view is the same as
context.mainwindow.canvas.

   Bernhard

-- 
Intevation GmbH                                 http://intevation.de/
Sketch                                 http://sketch.sourceforge.net/
Thuban                                  http://thuban.intevation.org/