Bizarre hapenning in my plugin

stéphane ducasse ducasse at
Sun Jan 22 11:33:13 UTC 2006

too for drafts of the book chapters.


On 22 janv. 06, at 03:22, Andreas Raab wrote:

> Bob -
> I *strongly* recommend you get a copy of the NuBlue book[*] and  
> read the chapter about "Extending the Virtual Machine", since, from  
> your message, it is obvious that you are missing fundamental parts  
> of the larger picture (which are covered by the book).
> [*]
> Cheers,
>   - Andreas
> Cowdery, Bob [UK] wrote:
>> 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.
>> --------------------------------------------------------------------- 
>> ---

More information about the Squeak-dev mailing list