Class: TkTextNamedMark

Class | TkTextNamedMark
In: | tk/lib/tk/textmark.rb
Parent: | TkTextMark

### Methods

new new

### Public Class methods

new(parent, name, *args)

[Source]

    # File tk/lib/tk/textmark.rb, line 126
      def self.new(parent, name, *args)
        if TMarkID_TBL[parent.path] && TMarkID_TBL[parent.path][name]
          return TMarkID_TBL[parent.path][name]
        else
          super(parent, name, *args)
        end
      end

new(parent, name, index=nil)

[Source]

    # File tk/lib/tk/textmark.rb, line 134
      def initialize(parent, name, index=nil)
        #unless parent.kind_of?(TkText)
        #  fail ArgumentError, "expect TkText for 1st argument"
        #end
        @parent = @t = parent
        @tpath = parent.path
        @path = @id = name
        TMarkID_TBL[@id] = self
        TMarkID_TBL[@tpath] = {} unless TMarkID_TBL[@tpath]
        TMarkID_TBL[@tpath][@id] = self unless TMarkID_TBL[@tpath][@id]
        tk_call_without_enc(@t.path, 'mark', 'set', @id,
                            _get_eval_enc_str(index)) if index
        @t._addtag id, self
      end

[Validate]