MgServerAdmin.GetSiteVersion() Regards, Trevor
-----Original Message----- From: mapguide-users-boun...@lists.osgeo.org [mailto:mapguide-users-boun...@lists.osgeo.org] On Behalf Of Zac Spitzer Sent: June 4, 2010 12:54 AM To: MapGuide Users Mail List Subject: Re: [mapguide-users] Mapguide OpenSource 2.2 backward compatibility problem via the mapagent http://localhost:8008/mapguide/mapagent/mapagent.fcgi?OPERATION=GETSITEVERSION&VERSION=1.0.0&LOCALE=en&CLIENTAGENT=MapGuide+Developer there is an equivalent in the web api On 4 June 2010 16:42, Bruno Scott <bsc...@geomapgis.com> wrote: > > Hi All > We have a quite big MGOS application deployed on hundreds of different > clients > Most of them use MGOS 2.1 or MGE 2010 SP1 > Some of them still use MGOS 2.0/1.2 or MGE 2010 / 2009 > They will migrate to MGOS 2.2 or MGE 2011 but this process takes time so our > application > have to live in a multi version MGOS/MGE. > > Now comes the problem with MGOS 2.2/MGE 2011 > We use extensively the MgException::GetMessage() fonction > this function does not exist anymore because it is replaced by > GetExceptionMessage. > If we would only support MGOS 2.2/MGE 2011 it would be an easy fix. > Search and replace... (260 occurances in 79 files....) > But our code would not work in older MG anymore > the error comes at compile time, so pretty hard to catch > We are thinking of centralizing this call in a new internal function > string MgGetExceptionMessage(MgException mgEx,string locale) > { > //if MGOS 2.2 or MGE 2011 > return mgEx.GetExceptionMessage(locale); > //else > //return mgEx.GetMessage(); > } > so this would simplify the code switching from 2.2/2011 to 2.1/2010 > We would need to detect the MG version in our application setup > then switch this call from GetMessage to GetExceptionMessage > > What would be the safest way (for an setup program) to detect the MG > version? > Thanks for your answer. > Bruno > > > by the way, it would have been a lot easier for us if would have kept the > GetMessage function > for backward compatibility > > > > > > -- > View this message in context: > http://osgeo-org.1803224.n2.nabble.com/Mapguide-OpenSource-2-2-backward-compatibility-problem-tp5138292p5138292.html > Sent from the MapGuide Users mailing list archive at Nabble.com. > _______________________________________________ > mapguide-users mailing list > mapguide-users@lists.osgeo.org > http://lists.osgeo.org/mailman/listinfo/mapguide-users > -- Zac Spitzer Solution Architect / Director Ennoble Consultancy Australia http://www.ennoble.com.au http://zacster.blogspot.com +61 405 847 168 _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users _______________________________________________ mapguide-users mailing list mapguide-users@lists.osgeo.org http://lists.osgeo.org/mailman/listinfo/mapguide-users