This document highlights changes made between version 9 and 9.1 and the steps that can be taken to move existing ArcObjects code from 9.0 to 9.1. If you are interested in migrating between the 8.x platform and 9.0, see the document 'Migrating from 8.3 to 9.0'.
Motif widgets
At 9.1 there have been a few changes to the ArcGIS Motif controls and how they are used. While existing applications will still run, if they need to be recompiled the following steps will need to be taken.
HRESULT MwCtlGetInterface(Widget w, IUknown** ppUnk)replacesI<ControlName>Control* Ao<ControlName>ControlGetInterface(Widget w);
at 9.0:
at 9.1:IMapControl3Ptr ipMapControl = AoMapControlGetInterface(mapWidget); // mapWidget is a widget defined earlierIMapControl3Ptr ipMapControl; MwCtlGetInterface(mapWidget, (IUnknown**)&g_ipMapControl); // mapWidget is a widget defined earlier- aoctl library replaces aomotifctl library
Makefile at 9.0:
Makefile at 9.1:-larcsdk -lmotifctl -laomotifctl-larcsdk -lmotifctl -laoctl Ao/AoMotifControls.hreplaces the individual include for each control (Ao/<ControlName>.h)
at 9.0:
at 9.1:#include<Ao/Map.h> #include<Ao/Toolbar.h> #include<Ao/TOC.h>#include<Ao/AoMotifControls.h>- Tool, Command, and Event classes are no longer Motif-specific. esrisystemutility and control-specific tlh's are replaced by including Ao/AoControls.h,
and Motif headers can be removed.
at 9.0:
at 9.1:// Motif Headers #define String esriXString #define Cursor esriXCursor #define Object esriXObject #define ObjectClass esriXObjectClass #include <Xm/Xm.h> #include <Xm/MainW.h> #include <Xm/Form.h> #include <Xm/Protocols.h> #undef String #undef Cursor #undef Object #undef ObjectClass // ArcObjects Headers // Engine #include <ArcSDK.h> #include <esrisystemutility.tlh> // in event classes #include <mapcontrol.tlh> // in event classes #include <mapcontrol_events.tlh> // in event classes #include <Ao/AoCommandBase.h> // in command classes #include <Ao/AoToolBase.h> // in tool classes // Controls #include <Ao/Map.h>// ArcObjects Headers // Engine #include <ArcSDK.h> // Controls #include <Ao/AoControls.h> // in event, tool, and command classes #include <Ao/AoCommandBase.h> // in command classes #include <Ao/AoToolBase.h> // in tool classes
Java visual components
A new set of visual beans is available in the 9.1 release. The new beans extend JComponent, solve some threading problems exhibited in Java IDEs, and contain internal references to the original components. The new visual beans behave more predictably within IDEs.
While applications that use the components released with 9.0 will continue to function, you may decide to take advantage of the new beans and migrate your existing applications. Migration is easy as the new beans reside within the same packages as the original components. Simply change the line or lines where the components are declared and instantiated so that they refer to the new beans instead of the components.
For example:
MapControl map;
map = new MapControl();
becomes this:
MapBean map;
map = new MapBean();
Or in another example:
TOCControl toc = new TOCControl();
becomes this:
TOCBean toc = new TOCBean();
Subsequent calls to the object do not need to be changed since the beans duplicate each method from the components.
If you need to get a handle on the component instance that is held within the visual bean, you can do so by calling a method on the bean. For example, to get the MapControl instance from a MapBean, call getMapControl().
ArcGIS Server Java ADF
Applications that use tables, such as the Search and Geocode Templates, must be modified to include the new 'value' attribute to the dataTable tag.
For example, the following code at 9.0:
<jsfh:dataTable id="findTable"
binding="#{sessionScope['searchContext'].attributes['esriAGSFindResults'].dataComponent}"
...
</jsfh:dataTable>
needs to be modified to be the following in 9.1 applications:
<jsfh:dataTable id="findTable"
binding="#{sessionScope['searchContext'].attributes['esriAGSFindResults'].dataComponent}"
value="#{sessionScope['searchContext'].attributes['esriAGSFindResults'].resultRows}"
...
</jsfh:dataTable>