realbasic-plugins
[Top] [All Lists]

Re: Returning an RB array

To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot com>
Subject: Re: Returning an RB array
From: Norman Palardy <npalardy at great-white-software dot com>
Date: Thu, 25 Jan 2007 14:58:34 -0700
Delivered-to: listarchive at realsoftware dot com
Delivered-to: realbasic-plugins at lists dot realsoftware dot com
References: <20070125210707 dot 9E57E6DC8C0 at mail dot verex dot com> <83BEE1E7-C741-46F8-AB97-4D49A2128F7C at cahir dot net>

On Jan 25, 2007, at 2:41 PM, Stephen A. Cochran Lists wrote:

I was thinking arrays, I thought the class would have to store the data in it's properties, which would still have to be arrays.

Use a dictionary with integer keys 0,1,2,3, etc
You get almost the exact same behavior as an array

_______________________________________________
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>


From  Thu 25 Jan 2007 15:01:01 -0700
Return-Path: <realbasic-plugins-bounces at lists dot realsoftware dot com>
X-Original-To: listarchive at realsoftware dot com
Delivered-To: listarchive at realsoftware dot com
Received: by xmail.realsoftware.com (Postfix, from userid 1037)
        id 6F1B2181412B; Thu, 25 Jan 2007 14:01:15 -0800 (PST)
X-Spam-Checker-Version: SpamAssassin 3.1.1 (2006-03-10) on www.realsoftware.com X-Spam-Level: X-Spam-Status: No, score=-1.7 required=4.5 tests=AWL,BAYES_00,NO_REAL_NAME autolearn=no version=3.1.1
Received: from lists.realsoftware.com (lists.realsoftware.com [209.198.132.125])
        by xmail.realsoftware.com (Postfix) with ESMTP id 99F111814123;
        Thu, 25 Jan 2007 14:01:09 -0800 (PST)
Received: from lists.realsoftware.com (localhost [127.0.0.1])
        by lists.realsoftware.com (Postfix) with ESMTP
        id 2DC2A18739BF; Thu, 25 Jan 2007 16:01:05 -0600 (CST)
X-Original-To: realbasic-plugins at lists dot realsoftware dot com
Delivered-To: realbasic-plugins at lists dot realsoftware dot com
Received: from mail.verex.com (mail.verex.com [66.116.103.197])
        by lists.realsoftware.com (Postfix) with ESMTP id B165318739B2
        for <realbasic-plugins at lists dot realsoftware dot com>;
        Thu, 25 Jan 2007 16:01:01 -0600 (CST)
Received: from [66.116.103.197] (localhost [127.0.0.1])
        by mail.verex.com (Postfix) with SMTP id 726556DC949
        for <realbasic-plugins at lists dot realsoftware dot com>;
        Thu, 25 Jan 2007 15:01:01 -0700 (MST)
Date: Thu, 25 Jan 2007 15:01:01 -0700
From: joe at strout dot net
To: realbasic-plugins at lists dot realsoftware dot com
In-Reply-To: <83BEE1E7-C741-46F8-AB97-4D49A2128F7C at cahir dot net>
X-Mailer: VerEx Email Gateway
Content-type: text/plain;
Content-transfer-encoding: 7bit
Message-Id: <20070125220101 dot 726556DC949 at mail dot verex dot com>
Subject: Re: Returning an RB array
X-BeenThere: realbasic-plugins at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic Plugins <realbasic-plugins at lists dot realsoftware dot 
com>
Sender: realbasic-plugins-bounces at lists dot realsoftware dot com
Errors-To: realbasic-plugins-bounces at lists dot realsoftware dot com

On Jan 25, 2007, at 21:41 UTC, Stephen A. Cochran Lists wrote:

I was thinking arrays, I thought the class would have to store the data in it's properties, which would still have to be arrays.

No, it can store it *internally* however you want.  A C array is fine,
if you like that sort of thing.  Or a linked list, or a hash table, or
whatever you want.  What goes on in your plugin is between you and your
C compiler.  :)

You're saying store the data in the class as a delimited string or something like that, and then have it's methods return it in the format desired or as random access?

I wouldn't store them as delimited strings.  I generally use something
like a class I wrote long ago called "Vector":
 <http://www.strout.net/info/coding/classlib/Vector.html>

But you can use whatever suits you best.  And then, yes, have your
class's methods return this data in some RB format or as random access.

Best,
- Joe

--
Joe Strout -- joe at strout dot net
Verified Express, LLC     "Making the Internet a Better Place"
http://www.verex.com/

_______________________________________________
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>