Bizarre hapenning in my plugin

Cowdery, Bob [UK] Bob.Cowdery at CGI-Europe.com
Sat Jan 21 21:57:24 UTC 2006


I have some bizarre happenings in my plugin. It must be me, but I have
no idea what's going on.

 

Firstly, the plugin does actually work and is not trivial because it
uses PortAudio which it streams through a little signal processing
function. I can start it and stop it and it all behaves properly. The
start() and stop() take no parameters. The problems start when I try and
pass parameters to the other functions. 

 

I tried a test function:

 

answerValue: value

 

            <primitive: 'answerValue' module:'SDRPhasingDSPPlugin'>

            Transcript show: 'Primitive answerValue failed'.

            ^ false

 

 

As far as I know you can just do this:

 

answerValue: value

 

            self export: true.

 

            (self cCode: 'return value')

 

This translated to:

 

EXPORT(int) answerValue(int value) {

            return value;

}

 

When I tried this it appeared to work. No failures and I got back what I
entered. Then I realised I could put anything as a parameter :

 

x answerValue: 'abc' 'abc'

 

Whatever parameter I gave it got echoed back regardless of whether it
was an int or not. I could even say.

 

x answerValue: x a SDRPhasingDSP

 

To prove this I changed the code to 

 

answerValue: value

 

            self export: true.

 

            (self cCode: 'return 100')

 

and still got back what I entered.

 

Incidentally:

 

x getModuleName a SDRPhasingDSP

 

also answers the type of x and not the plugin name.

 

Please put me on the right track someone before I go completely mad.

 

Thanks

Bob


*** Confidentiality Notice *** Proprietary/Confidential
Information belonging to CGI Group Inc. and its affiliates
may be contained in this message. If you are not a recipient
indicated or intended in this message (or responsible for
delivery of this message to such person), or you think for
any reason that this message may have been addressed to you
in error, you may not use or copy or deliver this message
to anyone else.  In such case, you should destroy this
message and are asked to notify the sender by reply email.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060121/24a1cbb5/attachment.htm


More information about the Squeak-dev mailing list