Home  |  Linux  | Mysql  | PHP  | XML
From:kksou Date:Fri Jun 20 00:24:29 2008
Subject:Re: Re[PHP-GTK] defining base class functions?

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.

Navigate in group php.gtk.general at sever news.php.net
Previous Next




  
© No Copyright
You are free to use Anything
Site Maintained by Zareef Ahmed
Powered By PHP Consultants