The accessor REALGetArrayInt which takes REALintArray and a int
index, indicates that arrays are not C++ arrays. Which is why it will
not work the way you are attempting to do it.
From the documentation then it seems there are only the following
accessors, that is no float (Single) array accessors.
REALGetArrayInt
REALGetArrayObject
REALGetArrayString
It should solve your problem for trials and hits but not for slevel
Björn
On 21.11.2006, at 03:09, Dr. Scott Steinman wrote:
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>
_______________________________________________
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>
|