Bizarre happening in my plugin
tim Rowledge
tim at rowledge.org
Sun Jan 22 17:11:08 UTC 2006
On 22-Jan-06, at 6:26 AM, Bob.Cowdery at CGI-Europe.com wrote:
> Here's the code in calling order. I get 'Primitive Mode Change
> failed' from this. The dll is called ok from the run/stop so it has
> to be parameters still.
>
> primModeChng: mode
> <primitive: 'modeChng' module:'SDRPhasingDSPPlugin'>
> Transcript show: 'Primitive Mode Change failed'.
> ^ false
>
> modeChng: mode
> self export: true.
>
> self primitive: 'Sideband'
> parameters: #(SmallInteger).
>
> (self
> cCode: 'SetSideband(mode)'
> inSmalltalk: [false])
> ifFalse: [^ interpreterProxy primitiveFail].
Compare the name of the plugin prim you are calling in
#primModeChange: and the name you are giving the prim in modeChng:
<primitive: 'modeChng' module:'SDRPhasingDSPPlugin'>
self primitive: 'Sideband'
parameters: #(SmallInteger).
How can the lookup find modeChng if you have only implemented
Sideband? I suggest that you name your primitives as
'primSetSideBand' etc to help with making it clear to you later which
bits of code are handlign the primitive and which bits a re support
code.
Minnow is no responding so you should start from http://
minnow.cc.gatech.edu/squeak/464 and take alook at Andy Greenbergs
tutorial and Ned Konz's paper and *especially* Andy's Specifications
For Named Primitives page. Which, admittedly, needs a bunch more
work. Sigh.
For reference, look at subclasses of SmartSyntaxInterpreterPlugin
such as FileCopyPlugin (for real triviality), FilePlugin etc.
tim
--
tim Rowledge; tim at rowledge.org; http://www.rowledge.org/tim
A bug in the hand is better than one as yet undetected.
More information about the Squeak-dev
mailing list
|