Re: Re[PHP-GTK] defining base class functions?

From: Date: Fri, 20 Jun 2008 06:24:29 +0000
Subject: Re: Re[PHP-GTK] defining base class functions?
References: 1  Groups: php.gtk.general 
Request: Send a blank email to php-gtk-general+get-8279@lists.php.net to get a copy of this message
Benjamin Smith wrote: > > Is there a way (PHP-GTK1) to redefine a base class method? Specifically, I > need to change set_usize() so that the values for X and Y can be > recalculated. > Hi Ben, Don't think PHP-GTK1 or PHP-GTK2 allows you to redefine a base class or override an existing class method. If you really need something like this now, maybe you could try this. 1) Do a global find and replace to change all set_usize($x, $y) to my_set_usize($x, $y) 2) Then define my_set_usize($x, $y) as what you've wanted function my_set_usize($x, $y) { set_usize(round($x * SIZEMULTIPLIER), round($y * SIZEMULTIPLIER)); } I know the solution is primitive and not your ideal solution. But at least you have something working till they allow you to override existing methods. Regards, /kksou -- View this message in context: http://www.nabble.com/Redefining-base-class-functions--tp17832602p18023768.html Sent from the Php - GTK - General mailing list archive at Nabble.com.

« previous php.gtk.general (#8279) next »