Problem: An ISelectionSet may not initially be assigned a value after the ISelectionEvents::SelectionChanged event is fired
文章编号 : 34267
软件: ArcGIS - ArcEditor 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcInfo 9.2, 9.3, 9.3.1 ArcGIS - ArcView 9.2, 9.3, 9.3.1 ArcGIS Engine Developer Kit 9.2, 9.3, 9.3.1, 10 ArcGIS Engine Runtime 9.2, 9.3, 9.3.1, 10
操作系统: N/A
软件: ArcGIS - ArcEditor 9.2, 9.3, 9.3.1, 10 ArcGIS - ArcInfo 9.2, 9.3, 9.3.1 ArcGIS - ArcView 9.2, 9.3, 9.3.1 ArcGIS Engine Developer Kit 9.2, 9.3, 9.3.1, 10 ArcGIS Engine Runtime 9.2, 9.3, 9.3.1, 10
操作系统: N/A
1 个回复
易智瑞技术支持
赞同来自:
原因: 这是产品本身设计的问题。
解决方法:
为了避免这个错误的发生,在事件发生获取之前的选择集时,先确认该选择集是否为空。ArcObjects的开发人员应在读或写之前初始化该变量。以下是一个VB6的例子:
[Visual Basic 6.0] ' Respond to selection events Private Sub m_pSelectionEvents_SelectionChanged() If m_pMap Is Nothing Then Exit Sub ' no map exit... If m_pMap.SelectionCount = 0 Then Exit Sub ' no selection nothing to do... MsgBox m_pMap.SelectionCount & " feature(s) are selected." End Sub
创建时间:2008-03-01
最近更新: 2011-05-03
【原文链接】
http://support.esrichina.com.c ... .html
要回复问题请先登录或注册