Yes Massimo you can create RB arrays from the plugin using the
REALCreateArray function or you can add elements to an existing array
using the realsetarrayva...@type@ or realinsertarrayva...@type@.
Take a look at the Plugin SDK Array Reference.html file (in RB->Extras-
>Plugins SDK->Documentation) ... RB for me is REALbasic 2008r5.1
Since the REALCreateArray exists I suppose that an array can be
returned by a method (even if I never tried it myself).
--
Marco Bambini
Server Architect
REAL Software, Inc.
On Jan 14, 2009, at 4:44 PM, Massimo Valle wrote:
Marco, I see there are specific functions to get an array element
(REALGetArrayInt) but I don't see any to set it or add an element.
Also, I'd prefer to avoid this solution in favor of a returned
array. Is that something not possible with the SDK?
Massimo Valle
On 14/gen/09, at 16:33, Marco Bambini wrote:
An array is always passed by reference so instead of returning an
array your method should take an array (of int based on your
example) as a parameter and then inside your method you can add new
elements to that array.
Hope this helps.
--
Marco Bambini
Server Architect
REAL Software, Inc.
On Jan 14, 2009, at 4:07 PM, Massimo Valle wrote:
Is there a way, (and if so, how) to return an array from a method?
I need to return an array of object and tried to use the
REALobjectArray struct without success.
I also tried with a simpler situation returning an array of int
with REALintArray but with the same result.
May be I messed up with pointers too...
static REALintArray getMyArray(void) {
int theArray[] = {0,1,2,3,4,5,6,7,8,9};
return (REALintArray)*theArray;
}
Thanks for help,
Massimo Valle
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>
_______________________________________________
Unsubscribe or switch delivery mode:
<http://www.realsoftware.com/support/listmanager/>
Search the archives:
<http://support.realsoftware.com/listarchives/lists.html>