This, nesting blocks, was the cause of my confusion with grid also (see 02/14/2001 thread). Nested blocks keep putting the widgets top-to-bottom rather than the grid pattern I was specifying. I now notice that the pickaxe book uses parenthesis for all of its examples (Ruby Tk Chapter) except for the first very basic example. Has anyone supplied a definitive answer to this question? > >Similarly... > > > >TkEntry.new(@window) { > > pack('side' => 'left') > >} > >TkButton.new(@window) { > > pack('side' => 'left') > >} > > > >correctly puts the two side by side left to right, however > > > >TkEntry.new(@window) { > > pack {side 'left'} > >} > >TkButton.new(@window) { > > pack {side 'left} > >} > > > >puts the two items top to bottom. > > This is because you can't nest the "block" notation with the "pack" method. > I don't have an explanation for why this doesn't work, but as far as I can > tell, it does not work. I've just resigned myself to using the parenthesized > form. What is happening is that the 'pack' method is being passed no > arguments at all, and so the default behavior (top to bottom packing) is > occuring. > > > >The pickaxe book implies that in both cases the two forms should be > >equivalent. What am I doing wrong? > > Maybe someone will shed light on this last question and englighten both > of us. =) > > Jeremy