Flare
Stops copies me!
- Reaction score
- 662
So, I don't need the structname prefix when calling the method? Just .membername (assuming the member is in the interface as well, right?)
struct SomeStruct
real r = 0.
method sayReal takes nothing returns nothing
call BJDebugMsg(R2S(.r))
endmethod
endstruct
// This sets the real to something other than 0.
// and then BJDebugMsg-shows that real.
function SaySomeReals takes nothing returns nothing
local SomeStruct S = SomeStruct.create()
set S.r = GetRandomReal(0.,100.)
call S.sayReal()
endfunction
But, in that example, that struct isn't extending/an extension of another struct.
I know, but the questions you're asking are more about the mechanics of methods
Great tutorial. I really liked the example with the marbles ^^
Well, this has to be one of the most explanatory and detailed tutorial about interfaces and struct extensions. I have nothing bad to say.
I will let this get some more feedback before approving.