Call an interface method from a procedure

Just starting out? Need help? Post your questions and find answers here.
WolfgangS
Enthusiast
Enthusiast
Posts: 174
Joined: Fri Apr 25, 2003 3:30 pm

Call an interface method from a procedure

Post 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
WolfgangS' projects http://www.schliess.net
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
Moonshine
Enthusiast
Enthusiast
Posts: 263
Joined: Tue May 25, 2004 12:13 am
Location: UK

Post 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.
Mark my words, when you least expect it, your uppance will come...
WolfgangS
Enthusiast
Enthusiast
Posts: 174
Joined: Fri Apr 25, 2003 3:30 pm

Post 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
WolfgangS' projects http://www.schliess.net
Quotation of the month:
<p3hicy>oder ich hol mir so eine geile aus asien
<p3hicy>die ständig poppen will
<p3hicy>'n brötchen pro tag reicht doch
<p3hicy>die essen eh' nich so viel
Post Reply