zoukankan      html  css  js  c++  java
  • 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.
  • 相关阅读:
    记录下平台多种语言加密算法实施的历程
    Php AES加密、解密与Java互操作的问题
    Tomcat服务器常用配置和HTTP简介
    淘宝IP地址查询
    linux下hexdump和od命令:显示文件十六进制格式
    技术讨论 | 简谈渗透测试各阶段我常用的那些“神器”
    串口发送数据速度
    在Qt示例项目的C ++ / QML源中的//! [0]的含义是什么?
    C++ 函数参数中“ *&代表什么? ”
    c++中三种参数引用方式
  • 原文地址:https://www.cnblogs.com/xiexiaokui/p/158621.html
Copyright © 2011-2022 走看看