View Full Version : How do you call a superclass method?
wvxvw
10-31-2009, 02:44 AM
Newbish question :)
So, how do you call a superclass method?
It says Field super cannot be accessed for reading
senocular
10-31-2009, 03:04 AM
Looks like it should work
http://haxe.org/ref/oop
(Under Extends)
wvxvw
10-31-2009, 04:52 AM
Thanks, yes, I've seen that one, but, the problem as it comes is only inside constructor, the other methods seem to be OK...
wvxvw
11-01-2009, 05:15 PM
Well, negative answer is also an answer...
http://haxe.markmail.org/message/fudib6lvvzjwomf4?q=property+override#query:propert y%20override+page:1+mid:fudib6lvvzjwomf4+state:res ults
and
http://haxe.org/forum/thread/685
In a nut shell:
You cannot override FP built-in classes properties (getters / setters).
EDIT: But, actually, the first link makes sense in saying that composition may be a preferred way to go about it. Somehow I always struggled against a bunch of a properties I have to deal somehow in classes extending other classes that have lots of properties the extending class doesn't need. Now as I look at it again, it makes much more sense to me... Well, if, say I need a DisplayObject-like class that only has width, height, x and y, why drag all the dozens of properties into this new class? :)
|
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.