realbasic-nug
[Top] [All Lists]

Re: Store colors in an array

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Store colors in an array
From: "Joseph J. Strout" <joe at strout dot net>
Date: Tue, 28 Feb 2006 13:23:18 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <31F233E8-AF2B-4E05-ACF6-4513DCFEAB81 at panamind dot com>
At 11:42 AM -0500 2/28/06, Gary Edge wrote:

I'm trying to store colors in an array:

dim colors(-1) as color

colors.append &c75A2DD
etc...

OK.  So you've created a local array, and stuffed colors into it.

Then in another method write:

Wait a second -- what you created above was a LOCAL array. It doesn't exist in any other method.

for i = 0 to ubound(colors)
    g.forecolor = colors(i)  // crashes here

What sort of crash, exactly? Frankly I'm surprised it compiles at all -- you must have some other identifier called "colors" that's not the same as what you showed above.

You certainly CAN store colors in an array, but of course if you want it to be used in more than one method, then you want to use a property, not a local variable.

Best,
- Joe

--

Joseph J. Strout
joe at strout dot net
_______________________________________________
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  Tue 28 Feb 2006 14:41:49 EST
Return-Path: <realbasic-nug-bounces at lists dot realsoftware dot com>
Received: from lists.realsoftware.com (209.198.132.125) by realsoftware.com
with ESMTP (Eudora Internet Mail Server 3.1.3);
Tue, 28 Feb 2006 13:42:28 -0600
Received: from lists.realsoftware.com (localhost [127.0.0.1])
        by lists.realsoftware.com (Postfix) with ESMTP
        id 5C87A1133CA1; Tue, 28 Feb 2006 13:42:16 -0600 (CST)
X-Original-To: realbasic-nug at lists dot realsoftware dot com
Delivered-To: realbasic-nug at lists dot realsoftware dot com
Received: from imo-m17.mx.aol.com (imo-m17.mx.aol.com [64.12.138.207])
        by lists.realsoftware.com (Postfix) with ESMTP id B1D501133C8A
        for <realbasic-nug at lists dot realsoftware dot com>;
        Tue, 28 Feb 2006 13:42:03 -0600 (CST)
Received: from GAmoore at aol dot com
        by imo-m17.mx.aol.com (mail_out_v38_r7.3.) id w.2e7.234fbb5 (39332)
        for <realbasic-nug at lists dot realsoftware dot com>;
        Tue, 28 Feb 2006 14:41:50 -0500 (EST)
From: GAmoore at aol dot com
Message-ID: <2e7 dot 234fbb5 dot 3136017d at aol dot com>
Date: Tue, 28 Feb 2006 14:41:49 EST
To: realbasic-nug at lists dot realsoftware dot com
MIME-Version: 1.0
X-Mailer: Thunderbird - Mac OS X sub 293
X-Spam-Flag: NO
Content-Type: text/plain; charset="US-ASCII"
Content-Transfer-Encoding: 7bit
X-Content-Filtered-By: Mailman/MimeDel 2.1.2
Subject: re: remote debugger broken
X-BeenThere: realbasic-nug at lists dot realsoftware dot com
X-Mailman-Version: 2.1.2
Precedence: list
Reply-To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Sender: realbasic-nug-bounces at lists dot realsoftware dot com
Errors-To: realbasic-nug-bounces at lists dot realsoftware dot com

Here is the report I filed. This is really critical for me.

Report ID:    oosmpclg
Remote Debugger Broken (mac master, win stub) with Mac OS 10.4.5
_______________________________________________
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>