zoukankan      html  css  js  c++  java
  • inherit $this

    class aa {
     inherit itk::Widget
     public method kka
     constructor { args }  {
      puts $itk_component(hull)
      puts [ $this kkc]

    # [code $this kkc]
     }
    }
    body aa::kka { args } {
     puts "aa"
    }


    class bb {

     
     inherit aa
    # inherit itk::Widget
     public method kkb
     constructor { args } {
      puts $itk_component(hull)
      puts [ $this kkc]
     }
    }
    body bb::kkb { args } {
     puts "bb"
    }

    class cc {
     inherit bb
     public method kkc
     constructor { args } {
       eval bb::constructor $args
     } {
      puts $itk_component(hull)
      puts [ $this kkc]
     }
    }
    body cc::kkc { args } {
     puts "cc"
    }

    cc .c abt acd ad

    inherit a class,  $this = $this in the inherit class

  • 相关阅读:
    mariadb 数据库集群配置
    mariadb 4
    mariadb 3
    mariadb 2
    mariadb 1
    firewalld 防火墙
    k8s集群搭建
    k8s控制器资源
    k8s Ingress和ingress控制器
    k8s service对象
  • 原文地址:https://www.cnblogs.com/greencolor/p/2129752.html
Copyright © 2011-2022 走看看