zoukankan      html  css  js  c++  java
  • constructor $this tcl tk

    class ::classname{
       private variable m_device
       private variable m_label
       
       public method getLabel { device } {
       return $m_label($device)
       }

       public method getDevice { label } {
       return $m_device($label)
       }
     
       constructor { mapList } {
           puts "constructor $this"
            puts "list: $mapList"

            array set m_device [list]
            array set m_label [list]

            foreach {device label} $mapList {
                set m_device($label) $device
                set m_label($device) $label
            }
        }

        destructor {
            array unset m_device
            array unset m_label
        }
    }


    ::classname  newclassnamevar args
      ##constructor $this  newclassnamevar = $this
      ##args    maplist = args

  • 相关阅读:
    js中replace的正则替换
    ios沙盒路径
    Android开源框架
    小知识点
    __NSCFConstantString && __NSPlaceholderDictionary
    iq 格式分析
    C 函数
    Xcode报错
    XMPP Server
    H5网站借鉴
  • 原文地址:https://www.cnblogs.com/greencolor/p/2026236.html
Copyright © 2011-2022 走看看