From: Edgardo Hames Date: 2004-11-06T00:38:47+09:00 Subject: Re: [KDIALOG] kdialog-0.2 On Fri, 5 Nov 2004 22:48:44 +0900, gabriele renzi wrote: > Edgardo Hames ha scritto: > > >>just a thing. It would be nice it KDialog::NO and KDialog::CANCEL had > >>false values (i.e false and nil) > >> > >>so that you could write > >>if Kdialog.new("Test").yesno('Do you like this class?) > >> p 'thanks' > >>else > >> p 'then go playing with curses' > >>end > > > > Actually, I did think of that, but I didn't know what to do in the > > following scenario: > > > > Kdialog.new("Test").yesnocancel('Save and Quit?) > > Yes means save and quit > > No means !save and quit > > Cancel means !quit > > > > How can I differentiate between No and Cancel if they have the same values? > > I'm not suggestint to have the same values :) > I'm suggesting to have false for No and nil for Cancel. OK.Now it makes sense to me ;) > # the only other case where res != true is res==false I guess so... :-S but I didn't understand your idea in the first message. Thanks for your suggestions, Ed -- Despite the surge of power you feel upon learning Ruby, resist the urge to trip others or slap them in the bald head. DO NOT LORD YOUR RUBYNESS OVER OTHERS!