realbasic-nug
[Top] [All Lists]

Re: Store colors in an array [Another 'Blame it on my blood sugar level'

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Store colors in an array [Another 'Blame it on my blood sugar level' moment]
From: "Joseph J. Strout" <joe at strout dot net>
Date: Tue, 28 Feb 2006 18:27:01 -0600
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <31F233E8-AF2B-4E05-ACF6-4513DCFEAB81 at panamind dot com> <a06200700c02a534fd55d at [10 dot 71 dot 2 dot 34]> <43EDD89F-10CF-4955-A3EF-8CAED38B068A at panamind dot com> <B2BF86D6-9EBF-4069-827F-778AB27DFC8C at mac dot com> <39FAAD0C-09F1-47C7-B1FA-942444C11D58 at panamind dot com>
At 3:54 PM -0500 2/28/06, Gary Edge wrote:

I had already worked around the array problem but went back and put the parenthesis' in to see if it made a difference. Then I noticed that even though the array was being created in the function, It wasn't being returned to the calling method. The 'return c' was missing.

Yep, that'll do it. If you have a function that returns an array (of any type, not just colors), and forget to actually return an array, then you have a null array reference -- which will indeed crash the app when you use it.

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>


<Prev in Thread] Current Thread [Next in Thread>