- Joined
- Sep 9, 2007
- Messages
- 6,759
Hello guys there!
I am having a small problem...
Why does it call the method "childOnly" of the parent, instead of the child's method?
Edit:
What I want:
A parent struct
- This struct has a few stub methods the child will get
- The parent has a static method which will also be given to the child
-> In this method it referes to another static method of thistype (the struct itself)
A child struct
- Which extends the parent
- Which has a few new methods (stub overwrite)
- Which has a few parent methods (like the static one, without needing to rewrite in child)
even more explaination:
basicly I have 4 methods: 1 static and 1 normal in each struct (2 structs). The child struct also has the static, but also an own normal method. The static referes to the current struct normal method. But that doesn't work.
I am having a small problem...
JASS:
struct Parent
static thistype array instances[15]
stub method childOnly ...
static method call
call (run the other method of the current struct, NOT parent)
endmethod
endstruct
struct Child extends Parent
public method test ...
call THIS_STRUCT_NAME.instances[0].call()
endmethod
endstruct
Edit:
What I want:
A parent struct
- This struct has a few stub methods the child will get
- The parent has a static method which will also be given to the child
-> In this method it referes to another static method of thistype (the struct itself)
A child struct
- Which extends the parent
- Which has a few new methods (stub overwrite)
- Which has a few parent methods (like the static one, without needing to rewrite in child)
even more explaination:
basicly I have 4 methods: 1 static and 1 normal in each struct (2 structs). The child struct also has the static, but also an own normal method. The static referes to the current struct normal method. But that doesn't work.
Last edited: