Class TkObject
In: tk/lib/tk.rb
tk/tkutil/tkutil.c
Parent: TkKernel

Methods

Included Modules

Tk TkConfigMethod TkBindCore

Public Instance methods

[Source]

# File tk/lib/tk.rb, line 3969
  def destroy
    #tk_call 'trace', 'vdelete', @tk_vn, 'w', @var_id if @var_id
  end
 --> definition is moved to TkUtil module

def path

  @path

end

[Source]

# File tk/lib/tk.rb, line 3870
  def epath
    @path
  end

[Source]

# File tk/lib/tk.rb, line 3945
  def event_generate(context, keys=nil)
    if context.kind_of?(TkEvent::Event)
      context.generate(self, ((keys)? keys: {}))
    elsif keys
      #tk_call('event', 'generate', path, 
      #       "<#{tk_event_sequence(context)}>", *hash_kv(keys))
      tk_call_without_enc('event', 'generate', path, 
                          "<#{tk_event_sequence(context)}>", 
                          *hash_kv(keys, true))
    else
      #tk_call('event', 'generate', path, "<#{tk_event_sequence(context)}>")
      tk_call_without_enc('event', 'generate', path, 
                          "<#{tk_event_sequence(context)}>")
    end
  end

[Source]

# File tk/lib/tk.rb, line 3908
  def method_missing(id, *args)
    name = id.id2name
    case args.length
    when 1
      if name[-1] == ?=
        configure name[0..-2], args[0]
        args[0]
      else
        configure name, args[0]
        self
      end
    when 0
      begin
        cget(name)
      rescue
        super(id, *args)
#        fail NameError, 
#             "undefined local variable or method `#{name}' for #{self.to_s}", 
#             error_at
      end
    else
      super(id, *args)
#      fail NameError, "undefined method `#{name}' for #{self.to_s}", error_at
    end
  end

/

[Source]

/*************************************/

static VALUE
tkobj_path(self)
    VALUE self;
{
    return rb_ivar_get(self, ID_at_path);
}

[Source]

# File tk/lib/tk.rb, line 3878
  def tk_send(cmd, *rest)
    tk_call(path, cmd, *rest)
  end

private :tk_send, :tk_send_without_enc, :tk_send_with_enc

[Source]

# File tk/lib/tk.rb, line 3889
  def tk_send_to_list(cmd, *rest)
    tk_call_to_list(path, cmd, *rest)
  end

[Source]

# File tk/lib/tk.rb, line 3895
  def tk_send_to_list_with_enc(cmd, *rest)
    tk_call_to_list_with_enc(path, cmd, *rest)
  end

[Source]

# File tk/lib/tk.rb, line 3892
  def tk_send_to_list_without_enc(cmd, *rest)
    tk_call_to_list_without_enc(path, cmd, *rest)
  end

[Source]

# File tk/lib/tk.rb, line 3898
  def tk_send_to_simplelist(cmd, *rest)
    tk_call_to_simplelist(path, cmd, *rest)
  end

[Source]

# File tk/lib/tk.rb, line 3904
  def tk_send_to_simplelist_with_enc(cmd, *rest)
    tk_call_to_simplelist_with_enc(path, cmd, *rest)
  end

[Source]

# File tk/lib/tk.rb, line 3901
  def tk_send_to_simplelist_without_enc(cmd, *rest)
    tk_call_to_simplelist_without_enc(path, cmd, *rest)
  end

[Source]

# File tk/lib/tk.rb, line 3884
  def tk_send_with_enc(cmd, *rest)
    tk_call_with_enc(path, cmd, *rest)
  end

[Source]

# File tk/lib/tk.rb, line 3881
  def tk_send_without_enc(cmd, *rest)
    tk_call_without_enc(path, cmd, *rest)
  end

[Source]

# File tk/lib/tk.rb, line 3874
  def to_eval
    @path
  end

[Validate]

ruby-doc.org is hosted and maintained by James Britt and Happy Camper Studios, a Ruby application development company in Phoenix, Arizona. The site was created in 2002 as part of the Ruby Documentation Project to promote the Ruby language and to help other Ruby hackers.

Documentation content on ruby-doc.org is provided by remarkable members of the Ruby community.

For more information on the Ruby programming language, visit ruby-lang.org.

Want to help improve Ruby's API docs? See Ruby Documentation Guidelines.