Forum: Ruby RUBY TK

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Jesus J. (Guest)
on 2009-03-06 02:20
I NEED TO REMOVE ELEMENTS FROM A TKVARIABLE.NEW_HASH I AM USING TKTABLE
PLEASE HELP ME
Hidetoshi NAGAI (Guest)
on 2009-03-06 03:53
(Received via mailing list)
From: Jesus J. <removed_email_address@domain.invalid>
Subject: RUBY TK
Date: Fri, 6 Mar 2009 09:19:28 +0900
Message-ID: <removed_email_address@domain.invalid>
> I NEED TO REMOVE ELEMENTS FROM A TKVARIABLE.NEW_HASH I AM USING TKTABLE
> PLEASE HELP ME

$ irb -r tk
irb(main):001:0> v = TkVariable.new_hash('aaa'=>1, 'bbb'=>2, 'ccc'=>3)
=> #<TkVariable: v00000>
irb(main):002:0> v.value
=> {"aaa"=>"1", "bbb"=>"2", "ccc"=>"3"}
irb(main):003:0> v['ddd'] = 4
=> 4
irb(main):004:0> v.value
=> {"aaa"=>"1", "bbb"=>"2", "ccc"=>"3", "ddd"=>"4"}
irb(main):005:0> v.unset('bbb')
=> true
irb(main):006:0> v.value
=> {"aaa"=>"1", "ccc"=>"3", "ddd"=>"4"}
irb(main):007:0>
Phlip (Guest)
on 2009-03-06 04:20
(Received via mailing list)
Jesus J. wrote:
> I NEED TO REMOVE ELEMENTS FROM A TKVARIABLE.NEW_HASH I AM USING TKTABLE
> PLEASE HELP ME

A> PLEASE DON'T SHOUT! That's what it looks like when we are all typing
in
downcase...

B> Please prep such questions with Google (or a comparable search
engine), and
be prepared to report how its citations failed you. Otherwise, our
forums will
fill up with the same FAQs, and we would lose interest in responding!
This topic is locked and can not be replied to.