John M. McIntosh wrote:
Thanks very much for the comprehensive reply John. I was fairly sure the answer was in what I needed to do with the stack. I think what confused me was I found some examples that did what I did and others that did stuff with the stack. I also read that Slang automatically handled the stack. I put 2 and 2 together and got 5. I'm sure I can figure out what to do now though. Bob *** Confidentiality Notice ***
Proprietary/Confidential |
John M. McIntosh wrote: > It's the
Getting there, but clearly I don't completely understand yet. 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
modeChng: mode
self primitive: 'Sideband'
(self
# the generated function and the function it calls
mode = interpreterProxy->stackIntegerValue(0);
int SetSideband( int sideband )
Bob-- *** Confidentiality Notice ***
Proprietary/Confidential |
On 22-Jan-06, at 6:26 AM, [hidden email] 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]. #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; [hidden email]; http://www.rowledge.org/tim A bug in the hand is better than one as yet undetected. |
In reply to this post by Bob.Cowdery
Tim Rowledge said: > 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. I just figured out what I had done then your reply popped up. This is the trouble with not fully understanding what goes on. Now this is working I will take time out to tidy things up and make sure I know how it all fits together. Thanks to yourself and everyone else who helped. 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. |
Free forum by Nabble | Edit this page |