From: Hidetoshi NAGAI Date: 2005-06-23T12:38:19+09:00 Subject: Re: tk canvas question From: Joe Van Dyk Subject: Re: tk canvas question Date: Thu, 23 Jun 2005 04:03:26 +0900 Message-ID: > Apparently, I can just delete the group. I'm not sure why it didn't > work before, but it is now. The reason is that "add" method call adds no canvas-tag to target widgets. TkcGroup has no "add" instance method. Then, Ruby/Tk assumes that it is configuration of "-add" option. Of course, canvas items don't have such option. However, if the target of configuration is a canvas-tag which is not assigned to any items, Tk generates no error and returns an empty string. So, TkcGroup#add does nothing and returns "" without errors. TkcGroup#include works properly, that is, adds its canvas-tag to target widgets. After that, TkcGroup#add will raise an exception 'unknown option "-add"'. -- Hidetoshi NAGAI (nagai@ai.kyutech.ac.jp)