[Mapguide-trac] [mapguide-trac] #2330: Not all methods available in IronPython console

MapGuide Open Source trac_mapguide at osgeo.org
Thu Aug 1 22:01:05 PDT 2013


#2330: Not all methods available in IronPython console
---------------------+------------------------------------------------------
 Reporter:  ismael   |         Owner:  jng    
     Type:  defect   |        Status:  closed 
 Priority:  medium   |     Milestone:         
Component:  Maestro  |       Version:  2.4.0  
 Severity:  major    |    Resolution:  invalid
 Keywords:           |   External_id:         
---------------------+------------------------------------------------------
Changes (by jng):

  * status:  new => closed
  * resolution:  => invalid


Comment:

 Confirmed that clr.ImportExtensions() will import any extension methods
 from the given namespace. Nothing to do on my end. Closing.

 {{{
 IronPython 2.7.1 (2.7.0.40) on .NET 4.0.30319.18213
 Type "help", "copyright", "credits" or "license" for more information.
 >>> conn = app.GetConnection(app.GetConnectionNames()[0])
 >>> import clr
 >>> clr.AddReference("OSGeo.MapGuide.MaestroAPI")
 >>> import OSGeo
 >>> mdf =
 conn.ResourceService.GetResource("Library://Samples/Sheboygan/Maps/Sheboygan.MapDefinition")
 >>> layer = mdf.GetLayerByName("Parcels")
 Traceback (most recent call last):
   File "<stdin>", line 1, in <module>
 AttributeError: 'MapDefinition' object has no attribute 'GetLayerByName'
 >>> clr.ImportExtensions(OSGeo.MapGuide.ObjectModels.MapDefinition)
 >>> layer = mdf.GetLayerByName("Parcels")
 >>> layer.Name
 'Parcels'
 >>>
 }}}

-- 
Ticket URL: <http://trac.osgeo.org/mapguide/ticket/2330#comment:3>
MapGuide Open Source <http://mapguide.osgeo.org/>
MapGuide Open Source Internals


More information about the mapguide-trac mailing list