Re: gtk2-perl / easily accessing objects properties

On Wed, Oct 30, 2002 at 12:42:38PM +0100, Guillaume Cottenceau wrote:
lanzz lanzz org writes:
On Tue, 29 Oct 2002 pozsy sch bme hu wrote:
But please implement those such a way that SET always returns the
$flag just set. (ie. ->allow_shrink etc always acts as GET, but if you
supply an argument, it also acts as a SET beforehand.)

would be better to return the old value. so you could say

There is no semantic meaning in returning a value when doing a
set, neither the new nor the old value, in my opinion.


you have not been lisping enough :-)

I think, and that's the way it is implemented, 
that SET should return the previous value.
I might be useful and nice:

  # lock window size
  my $oldvalue = $win->resizable(0);
  .... (do stuff) ......

and since you use:

$value = $win->resizable;

to GET it would be inconsistent not to return something
when you do a SET with the same function.


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]