to:xxsteven() :
这个试过了,不行啊

解决方案 »

  1.   

    写再private中呀!不应该出错的,你再检查一下,看看是不是哪出错了!
      

  2.   

    type
        { ..... }
      private
        {  ...  }
      public
        { ... }
      end;
    var
      { ...... }
    implementation
      

  3.   

    不太懂WebDispatcher
    property Action[index:integer]:tWebActionItem;
    读写方法没有码
      

  4.   

    要定义数组属性,必须满足三个条件
    1.数组特性要带下标,下标必须是简单类型
    2.数组特性必须带读、写访问方法,而不能是内部字段
    3.如果是多重数组,则访问方法也必须有相应个数的参数。所以你上面的声明是不对的,对于Action属性在TCustomWebDispatcher中就有,所以应该这么声明:
    ......
    Public
      Property Action;
    .....但我也不知,下面的定义为什么不行:
    ......
    Publish
      Property Action;
    .....要是自己定义的话,在Public 和Publish中定义都可以的:
    ......
    private
      Function GetMyAction(const AIndex:Integer):TWebActionItem;
      procedure SetMyAction(Index: Integer; Value: TWebActionItem);
    ......
    public
    ......
    property MyAction[index:integer]:TWebActionItem read GetMyAction write SetMyAction;