Page 1 of 1

Call an interface method from a procedure

Posted: Sat Nov 20, 2004 12:28 am
by WolfgangS

Code: Select all

Structure SOUNDSTRUCTURE
    SampleSourceObject.SampleSource
    SoundEffectObject.SoundEffect
EndStructure

Procedure playme(*mysound.SOUNDSTRUCTURE)
    *mysound\SoundEffectObject\play() ; works but crashes my windows
EndProcedure

Dim mysound.SOUNDSTRUCTURE(5)
...
playme(@mysound(0)) ; 
This works fine: mysound(0)\SoundEffectObject\play()
But when I want to call *mysound\SoundEffectObject\play() with playme(@mysound(0)) it works but in the same moment my windows crashes.
Does have anyone an idea why ?

Thank you + MFG

WolfgangS

Posted: Sat Nov 20, 2004 4:01 pm
by Moonshine
I assume the samplesource and soundeffect structures are interfaces? That looks like the only source of the problem that I can see. Something it doesnt like.

Posted: Sat Nov 20, 2004 4:05 pm
by WolfgangS
Moonshine wrote:I assume the samplesource and soundeffect structures are interfaces? That looks like the only source of the problem that I can see. Something it doesnt like.
Hmmm ...
but *is* there a way to start an method from a procedure ?
Or other question: Its this feature already implemented yet ?

MFG
WolfgangS