realbasic-plugins
[Top] [All Lists]

Plugins and arrays

To: realbasic-plugins at lists dot realsoftware dot com
Subject: Plugins and arrays
From: "Dr. Scott Steinman" <steinman at midsouth dot rr dot com>
Date: Mon, 20 Nov 2006 21:09:35 -0600
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
I can't seem to find the answer to my question anywhere in the plugin SDK, the MacTech article about plugin writing, the Declare statement's docs in the LR, or this list's archives. I exhausted the obvious places to look, so it's time to ask.

I was trying to write a plugin for C code containing the following function declaration:

int probit(int nlevel, float slevel[], int trials[], int hits[], float pcrit, float *pa, float *pb, float *pchi, int *pdof, float param []);

The int and float data types and the use of ByRef for the pointer data are simple to figure out, but how are arrays handled in the declaration in the REALmethodDefinition array? I tried writing the declaration using RB array declarations:

{ (REALproc) probit, REALnoImplementation, "probit( nLevel as Integer, sLevel() as Single, trials() as Integer, hits() as Integer, pCrit as Single, ByRef pa as Single, ByRef pb as Single, ByRef pChi as Single, ByRef pDof as Integer, param() as Single ) as Integer" },
        
Unfortunately, the test program using the plugin crashed when calling this function.

I'd appreciate some help. Just don't hit me with a hammer and tell me I'm an idiot -- that's my family's job. Thanks for your patience.

-Scott

Dr. Scott Steinman
Brought to you by a grant from the Steinman Foundation (Thanks, Mom and Dad!)
Recommended by Major University Studies Over the Leading Brand
steinman at midsouth dot rr dot com

I hope I die peacefully in my sleep like my grandfather. . .not screaming in terror like his passengers. -- "Deep Thoughts", Jack Handy

_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>

Search the archives of this list here:
<http://support.realsoftware.com/listarchives/lists.html>


<Prev in Thread] Current Thread [Next in Thread>