面朝大海,春暖华开

focus on scientific computue, 3dgis, spatial database
专注于科学计算、GIS空间分析

 

MapX bug 和设计缺陷

以下是我使用MapX过程中遇到的一些问题:

一.mapx 好像是特意为VB而作,VB色彩太浓,风格很难接受。

例如:所有的下标从1开始,很丑陋。

二.有些集合类的索引index不支持按顺序索引,只能以名字索引,很不方便。但在VB下面可以顺序index
例如:Layers[string],Layers._Item(string)合法,但Layers[int],Layers._Item(int)不合法。
三。很多类型不能初始化。

例如:Features fs = new FeaturesClass(); 出错。异常如下:

未处理的“System.Runtime.InteropServices.COMException”类型的异常出现在 WindowsApplication14.exe 中。

其他信息: 带有 CLSID {090703E1-9563-11D0-8796-00AA00B7EF73} 的 COM 对象无效或未注册。

四。弱数据类型。到处充满了object ,CObject,VARIANT,等等符号,跟没有数据类型没有任何区别,非常难看讨厌,给学习和使用不知带来了多大得问题(个人认为几乎占了学习MapX内容的60%-80%的精力,也就是说我得绝大部分时间花在这种无聊的低级记忆上)

五。有些数据类型可以反射,Clr Reflection ,但有些不行。Reflection是我like的性质之一。在这一点上我非常疑惑,为什么有的可以有的不可以。

六。重点讨论collection类型。这也是我很confused的地方。

1。(reference 二)。

2。不知dotnet是怎么处理复杂的interface的。很多MapX的集合类型实现了IEnumerable。这使得访问much convinent .。for example:You can access the collection like this

foreach(Layer in Layers)
[

}

3.On the contrary ,the document for MapObjects says that it has also implement the interface IEnumerable,but it is explicitely wrong! MapObjects can not return IEnumerator.So, you can not access the collection of MapObjects by using foreach.

4.All custome type of MapObjects can not be reflected by CLR. the ToString() function only retunr __COMObject.But MapX can do better.

posted on 2005-05-19 05:02  风过 无痕  阅读(3922)  评论(2编辑  收藏  举报

导航

向日葵支付宝收钱码