pombreda / libkml

Automatically exported from code.google.com/p/libkml
Other
0 stars 0 forks source link

LineStyle.set_color in python #19

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
1. Script:
#!/usr/bin/env python
import kmldom
factory = kmldom.KmlFactory_GetFactory()
print 'Create Linestyle'
LineStyle = factory.CreateLineStyle()
LineStyle.set_width(4) 
print 'Linestyle width:', LineStyle.get_width()
LineStyle.set_color('f0f0c80f')

What is the expected output? What do you see instead?
Expected: no traceback
I see:
Create Linestyle
Linestyle width: 4.0
Traceback (most recent call last):
  File "/workspace/python_projects/examples/libkml_test.py", line 8, in
<module>
    LineStyle.set_color('f0f0c80f')
  File "/Library/Python/2.5/site-packages/kmldom.py", line 1385, in <lambda>
    __getattr__ = lambda self, name: _swig_getattr(self, LineStyle, name)
  File "/Library/Python/2.5/site-packages/kmldom.py", line 34, in _swig_getattr
    raise AttributeError,name
AttributeError: set_color

What version of the product are you using? On what operating system?
libkml 0.3.2 and python bindings (python 2.5) on Mac OS X 10.5.4
Script tested with Eclipse 3.4 and Pydev 1.3.18

Did you run the unit test suite that comes with the project? Did all test pass?
yes (during build), all tests passed

Please provide any additional information below.
 I think LineStyle should inherit 'set_color' from ColorStyle.
Is there another way to set the color of a linestyle (or labelstyle,
iconstyle, ...)?

Diethart

Original issue reported on code.google.com by dieth...@wiedemuth.info on 29 Jul 2008 at 3:11

GoogleCodeExporter commented 9 years ago
This is fixed as of Rev 191

Original comment by kml.b...@gmail.com on 30 Jul 2008 at 3:48