Revision 900 org.gvsig.scripting/trunk/org.gvsig.scripting/org.gvsig.scripting.app/org.gvsig.scripting.app.mainplugin/src/main/resources-plugin/scripting/scripts/examples/monitor/monitor_suma3.py
monitor_suma3.py | ||
---|---|---|
1 |
# encoding: utf-8 |
|
1 | 2 |
|
2 |
from gvsig import * |
|
3 |
from commonsdialog import * |
|
3 |
from gvsig import currentView, currentLayer, getResource |
|
4 |
from gvsig.commonsdialog import msgbox, inputbox, QUESTION |
|
5 |
import os |
|
4 | 6 |
|
5 | 7 |
""" |
6 | 8 |
Para probar este ejemplo cargue la capa MANZANAS_POB de la carpeta |
... | ... | |
15 | 17 |
class MonitorSuma(ViewPortListener,FormPanel): |
16 | 18 |
|
17 | 19 |
def __init__(self, mapContext, layer, label, fieldname): |
18 |
FormPanel.__init__(self,script.getResource("monitor_suma3.xml"))
|
|
20 |
FormPanel.__init__(self, os.path.join(os.path.dirname(__file__), "monitor_suma3.xml"))
|
|
19 | 21 |
|
20 | 22 |
self.mapContext = mapContext |
21 | 23 |
self.layer = layer |
Also available in: Unified diff