From: David Tran Date: 2005-08-09T07:00:29+09:00 Subject: Re: Ruby/Tk core library desing question (TkCanvas#create) Or maybe the TkCanvas#create return the item created. Like: line = TkCanvas.new.pack.create(TkcLine, 0, 0, 100, 100) so the line is TkcLine instance object. But I still prefer TkCanvas#create returns self. ( so I can "chain" the TkCanvas methods ) Anyway, currentely returns 1 just seems useless to me. Thank you. On 8/8/05, David Tran wrote: > For TkCanvas#create method, it returns "1" seems useless ... > ( Does "1" means successful ? ) > > To fit in "Ruby" world, it would be better TkCanvas#create returns self. > > So you can write something like: > TkCanvas.new.pack.create(TkcRectangle, 0, 0, 5, 5).create(TkcOvale, > 50, 50, 70, 70) > > Currently, you cannot, the TkCanvas#create returns Fixnum 1. > > Thank you. >