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
[EMAIL PROTECTED]
_______________________________________________
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>

Reply via email to