realbasic-nug
[Top] [All Lists]

Re: Collection as Property?

To: REALbasic NUG <realbasic-nug at lists dot realsoftware dot com>
Subject: Re: Collection as Property?
From: Stuart Malin <stuart at zhameesha dot com>
Date: Thu, 30 Dec 2004 21:49:37 -0800
Delivered-to: realbasic-nug at lists dot realsoftware dot com
References: <CC971A9A-5AE1-11D9-A51D-000D9332E452 at netbox dot com> <072A8AE1-5AEF-11D9-951A-000A95A9544A at shaw dot ca>

On Dec 30, 2004, at 9:44 PM, Norman Palardy wrote:


On Dec 30, 2004, at 9:09 PM, Ken Fleisher wrote:

I have defined a property of a custom class (called ICCProfile) as a collection:

Tags As Collection

In a method within the ICCProfile class, I am trying to add objects to that collection:

Dim c As customClass
c = new customClass
// Add values to properties of c here
Tags.Add c, "key"    // This line gives me a nilObjectException

Am I trying something that is not allowed or do I just have the syntax wrong?

Do you have a

        tags = new Collection

anywhere ?

if not, you could put that in the Constructor for your custom class.

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