Page 1 of 1

[Question] Handlers

Posted: Sat Dec 19, 2009 2:54 pm
by brutus
Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere

Re: [Question] Handlers

Posted: Sun Dec 20, 2009 12:42 am
by Lee
brutus wrote:Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere
yes they do...
a func requiers a return false or return true and this cant be done on void.

Re: [Question] Handlers

Posted: Sun Dec 20, 2009 2:52 am
by brutus
Lee wrote:
brutus wrote:Hello.
can someone answer me why all command handlers are boolean methods? they doesnt return anything anywhere
yes they do...
a func requiers a return false or return true and this cant be done on void.
can u show me an example? which function uses thes booleans

boolean methods are used to return false/true somewhere but in this case there isnt any other method that use them as check i didnt find any

Re: [Question] Handlers

Posted: Sun Dec 20, 2009 7:19 am
by janiii
probably it was used with a return value some time before, so that the methods have now their boolean return values, but they are nowhere used. that is not an error, is done normally. (e.g. the boolean return value of executeUpdate of an sql query is mostly also not used). it is just about making a possibility for checking if the admin command went wrong or good and to check it somewhere else - can be done, but dont have to be done.

Re: [Question] Handlers

Posted: Sun Dec 20, 2009 8:35 pm
by brutus
yep its what i thought that they were used before but right now they arent.. i am pretty sure that changing them to void methods wont increase/decrease the performance but it will be just more clean :|