Re: gtk2-perl / easily accessing objects properties



lanzz lanzz org wrote:

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

$old = $window->allow_shrink(0);
...
$window->allow_shrink($old);

i agree completely, as this is a useful and common idiom i've seen in a fair amount of code.

also, as another two bits, i prefer the "autoloaded method" form for properties rather than the hash key form, because the hash key form offers a possibility for conflict with user data keys.




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